def execute_tally_action(cmd):
    """Execute a tally based action."""
    if cmd.action == "create" and cmd.has_valid_params:
        return cmd.tally_ho.create_tally(cmd.category, cmd.tally)
    elif cmd.action == "get" and cmd.has_valid_params:
        return cmd.tally_ho.get_tally(cmd.tally, cmd.category)
    elif cmd.action == "list":
        return cmd.tally_ho.get_tallies()
    elif cmd.action == "delete" and cmd.has_valid_params:
        return cmd.tally_ho.delete_tally(cmd.category, cmd.tally)