def import_(module, command=None):
    """import the module. return module.command if command is specified

    :param module: module of the command to import
    :type module: str

    :param command: command to import
    :type command: str

    :return: the imported function
    :rtype: function
    """

    # get module
    mod = __import__(module, fromlist=[''])

    # return
    return getattr(mod, command) if command else mod