def find_all_unit_property_names(properties_dict: dict, features_dict: dict):
    """
    Finds all existing units properties and units spikes features in the sorting
    dictionaries.
    """
    properties_set = set()
    for k, v in properties_dict.items():
        properties_set.update(list(v.keys()))

    features_set = set()
    for k, v in features_dict.items():
        features_set.update(list(v.keys()))

    return properties_set, features_set