def make_autogen_str():
    r"""
    Returns:
        str:

    CommandLine:
        python -m utool.util_ipynb --exec-make_autogen_str --show

    Example:
        >>> # DISABLE_DOCTEST
        >>> from utool.util_ipynb import *  # NOQA
        >>> import utool as ut
        >>> result = make_autogen_str()
        >>> print(result)
    """
    import utool as ut
    def get_regen_cmd():
        try:
            if len(sys.argv) > 0 and ut.checkpath(sys.argv[0]):
                # Check if running python command
                if ut.is_python_module(sys.argv[0]):
                    python_exe = ut.python_executable(check=False)
                    modname = ut.get_modname_from_modpath(sys.argv[0])
                    new_argv = [python_exe, '-m', modname] + sys.argv[1:]
                    return ' '.join(new_argv)
        except Exception as ex:
            ut.printex(ex, iswarning=True)
        return ' '.join(sys.argv)

    autogenkw = dict(
        stamp=ut.timestamp('printable'),
        regen_cmd=get_regen_cmd()
        #' '.join(sys.argv)
    )
    return ut.codeblock(
        '''
        # Autogenerated on {stamp}
        # Regen Command:
        #    {regen_cmd}
        #
        '''
    ).format(**autogenkw)
r"""
    Returns:
        str:

    CommandLine:
        python -m utool.util_ipynb --exec-make_autogen_str --show

    Example:
        >>> # DISABLE_DOCTEST
        >>> from utool.util_ipynb import *  # NOQA
        >>> import utool as ut
        >>> result = make_autogen_str()
        >>> print(result)