code: def make_session(username=None, password=None, bearer_token=None, extra_headers_dict=None): 
      
  
      if password is None and bearer_token is None:
          logger.error("No authentication information provided; "
                       "please check your object")
          raise KeyError
  
      session = requests.Session()
      session.trust_env = False
      headers = {'Accept-encoding': 'gzip',
                 'User-Agent': 'twitterdev-search-tweets-python/' + VERSION}
      if bearer_token:
          logger.info("using bearer token for authentication")
          headers['Authorization'] = "Bearer {}".format(bearer_token)
          session.headers = headers
      else:
          logger.info("using username and password for authentication")
          session.auth = username, password
          session.headers = headers
      if extra_headers_dict:
          headers.update(extra_headers_dict) 
      return session
docs: Creates a Requests Session for use. Accepts a bearer token
      for premiums users and will override username and password information if
      present.
  
      Args:
          username (str): username for the session
          password (str): password for the user
          bearer_token (str): token for a premium API user.