def new_space(<EOL>self,<EOL>name=None,<EOL>bases=None,<EOL>formula=None,<EOL>*,<EOL>refs=None,<EOL>source=None,<EOL>is_derived=False,<EOL>prefix="<STR_LIT>"<EOL>):
from modelx.core.space import StaticSpaceImpl<EOL>if name is None:<EOL><INDENT>name = self.spacenamer.get_next(self.namespace, prefix)<EOL><DEDENT>if name in self.namespace:<EOL><INDENT>raise ValueError("<STR_LIT>" % name)<EOL><DEDENT>if not prefix and not is_valid_name(name):<EOL><INDENT>raise ValueError("<STR_LIT>" % name)<EOL><DEDENT>space = self._new_space(<EOL>name=name,<EOL>formula=formula,<EOL>refs=refs,<EOL>source=source,<EOL>is_derived=is_derived,<EOL>)<EOL>self._set_space(space)<EOL>self.model.spacegraph.add_space(space)<EOL>if bases is not None:<EOL><INDENT>if isinstance(bases, StaticSpaceImpl):<EOL><INDENT>bases = [bases]<EOL><DEDENT>space.add_bases(bases)<EOL><DEDENT>return space<EOL>
Create a new child space.

        Args:
            name (str): Name of the space. If omitted, the space is
                created automatically.
            bases: If specified, the new space becomes a derived space of
                the `base` space.
            formula: Function whose parameters used to set space parameters.
            refs: a mapping of refs to be added.
            arguments: ordered dict of space parameter names to their values.
            source: A source module from which cell definitions are read.
            prefix: Prefix to the autogenerated name when name is None.