def add_derived(object_list, output_xml):
    """
    Check if input lists are not empty, write in xml for each list and return update if some
    updates has been made.
        Parameters:
            object_list ([Object]) : object with new derived
            output_xml (GenerateXML object) : XML's file object

        Returns:
            1 if update, else 0
    """
    if any(object_list):
        output_xml.write_derived(object_list)
        for obj in object_list:
            print(f"{obj.name} inherited from {obj.derived.name}")
        return 1
    return 0