<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def signed_session(self, session=None):
 # type: (Optional[requests.Session]) -> requests.Session """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 """

        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