code: def signed_session(self, session=None):
          # type: (Optional[requests.Session]) -> requests.Session
          
          session = super(ApiKeyCredentials, self).signed_session(session)
          session.headers.update(self.in_headers)
          try:
              # params is actually Union[bytes, MutableMapping[Text, Text]]
              session.params.update(self.in_query) # type: ignore
          except AttributeError:  # requests.params can be bytes
              raise ValueError("session.params must be a dict to be used in ApiKeyCredentials")
          return session
docs: Create requests session with ApiKey.
  
          If a session object is provided, configure it directly. Otherwise,
          create a new session and return it.
  
          :param session: The session to configure for authentication
          :type session: requests.Session
          :rtype: requests.Session