code: def _get_headers(self):
          
          headers = {
              'user-agent': 'IPinfoClient/Python{version}/1.0'.format(version=sys.version_info[0]),
              'accept': 'application/json'
          }
  
          if self.access_token:
              headers['authorization'] = 'Bearer {}'.format(self.access_token)
  
          return headers
docs: Built headers for request to IPinfo API.