# Path: scvelo/settings.py
# def set_rcParams_scvelo(fontsize=12, color_map=None, frameon=None):
# def set_rcParams_scanpy(fontsize=12, color_map=None, frameon=None):
# def set_figure_params(
#     style="scvelo",
#     dpi=100,
#     dpi_save=150,
#     frameon=None,
#     vector_friendly=True,
#     transparent=True,
#     fontsize=12,
#     figsize=None,
#     color_map=None,
#     facecolor=None,
#     format="pdf",
#     ipython_format="png2x",
# ):
# def set_rcParams_defaults():
# def _set_ipython(ipython_format="png2x"):
# def _set_start_time():


from datetime import datetime
from platform import python_version
from sys import stdout
from time import time as get_time
from packaging.version import parse
from anndata.logging import get_memory_usage
from scvelo import settings
    from .settings import logfile
    from functools import reduce
    from subprocess import CalledProcessError, check_output
    from . import __version__
    from . import __version__
        from . import settings
        from scanpy import settings
    import threading
    import cProfile
    import pstats
        function.
    """

    if logfile == "":
        print(*msg, end=end)
    else:
        out = ""
        for s in msg:
            out += f"{s} "
        with open(logfile, "a") as f:
            f.write(out + end)


def _sec_to_str(t, show_microseconds=False):
    """Format time in seconds.
    Parameters
    ----------
    t : int
        Time in seconds.
    """

    t_str = "%d:%02d:%02d.%02d" % reduce(
        lambda ll, b: divmod(ll[0], b) + ll[1:], [(t * 100,), 100, 60, 60]
    )
    return t_str if show_microseconds else t_str[:-3]


def get_passed_time():
    now = get_time()
    elapsed = now - settings._previous_time

# Path: scvelo/settings.py
# def set_rcParams_scvelo(fontsize=12, color_map=None, frameon=None):
# def set_rcParams_scanpy(fontsize=12, color_map=None, frameon=None):
# def set_figure_params(
#     style="scvelo",
#     dpi=100,
#     dpi_save=150,
#     frameon=None,
#     vector_friendly=True,
#     transparent=True,
#     fontsize=12,
#     figsize=None,
#     color_map=None,
#     facecolor=None,
#     format="pdf",
#     ipython_format="png2x",
# ):
# def set_rcParams_defaults():
# def _set_ipython(ipython_format="png2x"):
# def _set_start_time():


# Path: scvelo/logging.py
from datetime import datetime
from platform import python_version
from sys import stdout
from time import time as get_time
from packaging.version import parse
from anndata.logging import get_memory_usage
from scvelo import settings
    from .settings import logfile
    from functools import reduce
    from subprocess import CalledProcessError, check_output
    from . import __version__
    from . import __version__
        from . import settings
        from scanpy import settings
    import threading
    import cProfile
    import pstats

        function.
    """

    if logfile == "":
        print(*msg, end=end)
    else:
        out = ""
        for s in msg:
            out += f"{s} "
        with open(logfile, "a") as f:
            f.write(out + end)


def _sec_to_str(t, show_microseconds=False):
    """Format time in seconds.
    Parameters
    ----------
    t : int
        Time in seconds.
    """

    t_str = "%d:%02d:%02d.%02d" % reduce(
        lambda ll, b: divmod(ll[0], b) + ll[1:], [(t * 100,), 100, 60, 60]
    )
    return t_str if show_microseconds else t_str[:-3]


def get_passed_time():
    now = get_time()
    elapsed = now - settings._previous_time

    settings._previous_time = now