# Path: ecell4/extra/unit.py
# HAS_PINT = False
# STRICT = False
# HAS_PINT = True
# STRICT = True


import itertools
import copy
import warnings
import re
import ecell4_base
    import ecell4.util.decorator_base
    import libsbml
    import libsbml
    import libsbml
from ecell4.extra import unit
    from ecell4.util.model_parser import dispatch, SpeciesParsingVisitor
    from ecell4.util.model_parser import generate_ratelaw
    """
    Export a model as a SBMLDocument.

    Parameters
    ----------
    model : NetworkModel
    y0 : dict
        Initial condition.
    volume : Real or Real3, optional
        A size of the simulation volume. 1 as a default.
    is_valid : bool, optional
        Check if the generated model is valid. True as a default.

    """
    y0 = y0 or {}


    document = libsbml.SBMLDocument(3, 1)

    # ns = libsbml.XMLNamespaces()
    # ns.add("http://www.ecell.org/ns/ecell4", "ecell4")  #XXX: DUMMY URI
    # document.setNamespaces(ns)

    m = document.createModel()

    comp1 = m.createCompartment()
    comp1.setId('world')
    comp1.setConstant(True)

    if unit.HAS_PINT:

# Path: ecell4/extra/unit.py
# HAS_PINT = False
# STRICT = False
# HAS_PINT = True
# STRICT = True


# Path: ecell4/util/ports.py
import itertools
import copy
import warnings
import re
import ecell4_base
    import ecell4.util.decorator_base
    import libsbml
    import libsbml
    import libsbml
from ecell4.extra import unit
    from ecell4.util.model_parser import dispatch, SpeciesParsingVisitor
    from ecell4.util.model_parser import generate_ratelaw

    """
    Export a model as a SBMLDocument.

    Parameters
    ----------
    model : NetworkModel
    y0 : dict
        Initial condition.
    volume : Real or Real3, optional
        A size of the simulation volume. 1 as a default.
    is_valid : bool, optional
        Check if the generated model is valid. True as a default.

    """
    y0 = y0 or {}


    document = libsbml.SBMLDocument(3, 1)

    # ns = libsbml.XMLNamespaces()
    # ns.add("http://www.ecell.org/ns/ecell4", "ecell4")  #XXX: DUMMY URI
    # document.setNamespaces(ns)

    m = document.createModel()

    comp1 = m.createCompartment()
    comp1.setId('world')
    comp1.setConstant(True)

    if unit.HAS_PINT:

        if isinstance(volume, unit._Quantity):