def is_macro_action(unit_command_action, abilities):
    """
	This function determines if a unit_command action is a macro action
	based on the following criteria: if the action is related to training, morphing,
	researching or building units or technologies, then it is a macro action. It 
	returns a boolean.

	Feel free to add more stuff in macro_names by checking the stableid.json and
	adding names that you feel should be stored as macro actions.
	"""
    macro_names = [
        "Morph",
        "Research",
        "Train",
        "ZergBuild",
        "ProtossBuild",
        "TerranBuild",
    ]

    for name in macro_names:
        ability = abilities[unit_command_action.ability_id]
        # print(f"ability: {ability}")
        if name in ability.link_name:
            # we're also storing the the canceling of stuff.
            # if hasattr(ability, 'button_name') and 'Cancel' in ability.button_name:
            # 	return False
            return True

    return False