def __contains__(self, item):
if isinstance(item, str):<EOL><INDENT>return item in self._impl.namespace<EOL><DEDENT>elif isinstance(item, Cells):<EOL><INDENT>return item._impl in self._impl.cells.values()<EOL><DEDENT>elif isinstance(item, StaticSpace):<EOL><INDENT>return item._impl in self._impl.spaces.values()<EOL><DEDENT>else:<EOL><INDENT>return False<EOL><DEDENT>
Check if item is in the space.

        item can be either a cells or space.

        Args:
            item: a cells or space to check.

        Returns:
            True if item is a direct child of the space, False otherwise.