def get_connection_id(self, conn_or_int_id):
        """Get the connection 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:
            raise ArgumentError("You must supply either an int connection id or a string internal id to _get_connection_state", id=key)

        try:
            data = table[key]
        except KeyError:
            raise ArgumentError("Could not find connection by id", id=key)

        return data['conn_id']
def get_connection_id ( self , conn_or_int_id ) : key = conn_or_int_id if isinstance ( key , str ) : table = self . _int_connections elif isinstance ( key , int ) : table = self . _connections else : raise ArgumentError ( "You must supply either an int connection id or a string internal id to _get_connection_state" , id = key ) try : data = table [ key ] except KeyError : raise ArgumentError ( "Could not find connection by id" , id = key ) return data [ 'conn_id' ]
Get the connection 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.