def METHOD_NAME(elements: List[Struct], filtered_data_type: Type[Struct] = None) -> List[Struct]:
    """ Returns all elements from the given list having a given type.
    :param elements: A list of elements.
    :param filtered_data_type: If not None, only elements from the given type are returned.
    :return: All mesh objects from the given list.
    """
    if filtered_data_type is not None:
        return list(filter(lambda x: isinstance(x, filtered_data_type), elements))
    return elements