from typing import Tuple


def get_module_and_func_names(command: str) -> Tuple[str, str]:
    """
    Given a string of module.function, this functions returns the module name and func names.

    It also checks to make sure that the string is of expected 'module.func' format

    Args:
        command (str): String of format module.function_name

    Raises:
        Exception: If the string is of not format

    Returns:
        Tuple[str, str]: (module_name, function_name) extracted from the input string
    """
    mods = command.split('.')
    if len(mods) <= 1:
        raise Exception('The command should be a function to call')
    func = mods[-1]
    module = '.'.join(mods[:-1])
    return module, func