docs: def _convert_to_json(self, response):
          """Converts response to JSON.
          If the response cannot be converted to JSON then `None` is returned.
  
          Args:
              response - An object of type `requests.models.Response`
          Returns:
              Response in JSON format if the response can be converted to JSON. `None` otherwise.
          """
          try:
              return response.json()
          except ValueError:
              logging.warning('Expected response in JSON format from {0} but the actual response text is: {1}'.format(
                  response.request.url, response.text,
              ))
          return None