A US judge says Trump ally Rudy Giuliani is in contempt of court for failing to properly respond to requests for information in a case involving election staff.