def load_world(filename):
import ecell4_base<EOL>vinfo = ecell4_base.core.load_version_information(filename)<EOL>if vinfo.startswith("<STR_LIT>"):<EOL><INDENT>return ecell4_base.bd.World(filename)<EOL><DEDENT>elif vinfo.startswith("<STR_LIT>"):<EOL><INDENT>return ecell4_base.egfrd.World(filename)<EOL><DEDENT>elif vinfo.startswith("<STR_LIT>"):<EOL><INDENT>return ecell4_base.meso.World(filename)<EOL><DEDENT>elif vinfo.startswith("<STR_LIT>"):<EOL><INDENT>return ecell4_base.ode.World(filename)<EOL><DEDENT>elif vinfo.startswith("<STR_LIT>"):<EOL><INDENT>return ecell4_base.gillespie.World(filename)<EOL><DEDENT>elif vinfo.startswith("<STR_LIT>"):<EOL><INDENT>return ecell4_base.spatiocyte.World(filename)<EOL><DEDENT>elif vinfo == "<STR_LIT>":<EOL><INDENT>raise RuntimeError("<STR_LIT>".format(filename))<EOL><DEDENT>raise RuntimeError("<STR_LIT>".format(vinfo))<EOL>
Load a world from the given HDF5 filename.
The return type is determined by ``ecell4_base.core.load_version_information``.

Parameters
----------
filename : str
    A HDF5 filename.

Returns
-------
w : World
    Return one from ``BDWorld``, ``EGFRDWorld``, ``MesoscopicWorld``,
    ``ODEWorld``, ``GillespieWorld`` and ``SpatiocyteWorld``.