<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_connection(self, conn_or_int_id):
 """Get the data for a connection by either conn_id or internal_id Args: conn_or_int_id (int, string):
 The external integer connection id or and internal string connection id Returns: dict: The context data associated with that connection or None if it cannot be found. Raises: ArgumentError: When the key is not found in the list of active connections or is invalid. """


        key = conn_or_int_id
        if isinstance(key, str):
            table = self._int_connections
        elif isinstance(key, int):
            table = self._connections
        else:
            return None

        try:
            data = table[key]
        except KeyError:
            return None

        return data