def getUnitRegistry(length="<STR_LIT>", time="<STR_LIT>", substance="<STR_LIT>", volume=None, other=()):
ureg = pint.UnitRegistry()<EOL>ureg.define('<STR_LIT>')<EOL>try:<EOL><INDENT>pint.molar<EOL><DEDENT>except AttributeError:<EOL><INDENT>ureg.define('<STR_LIT>')<EOL>ureg.define('<STR_LIT>')<EOL><DEDENT>base_units = [unit for unit in (length, time, substance, volume) if unit is not None]<EOL>base_units.extend(other)<EOL>_ = ureg.System.from_lines(<EOL>["<STR_LIT>"] + base_units,<EOL>ureg.get_base_units)<EOL>ureg.default_system = '<STR_LIT>'<EOL>wrap_quantity(ureg.Quantity)<EOL>pint.set_application_registry(ureg)  <EOL>return ureg<EOL>
Return a pint.UnitRegistry made compatible with ecell4.

    Parameters
    ----------
    length : str, optional
        A default unit for '[length]'. 'meter' is its default.
    time : str, optional
        A default unit for '[time]'. 'second' is its default.
    substance : str, optional
        A default unit for '[substance]' (the number of molecules). 'item' is its default.
    volume : str, optional
        A default unit for '[volume]'. Its default is None, thus '[length]**3'.
    other : tuple, optional
        A list of user-defined default units other than the above.

    Returns
    -------
    ureg : pint.UnitRegistry