code: def base_url(self):
          
          if self.location in self.known_locations:
              return self.known_locations[self.location]
          elif '.' in self.location or self.location == 'localhost':
              return 'https://' + self.location
          else:
              return 'https://' + self.location + API_HOST_SUFFIX
docs: Protocol + hostname