def register(command, command_dict):
    """
    Decorator factory, decorator registers a function as a command in a given dict

    Args:
        command (str): string used to invoke command
        dict (dict): dictionary to register commands in
    """
    def decorator(func):
        command_dict[command] = func
        return func
    return decorator