def METHOD_NAME(struct: type) -> List[dict]:
    """Returns fields info from struct
    :param struct: struct type
    :return:
    """
    # annotations is a dictionary containing key-type pair
    # which has field_name as a key and type as a value
    annotations = struct.__annotations__
    fields = []
    for name, type_hint in annotations.items():
        field = {"name": name}
        type_hints: List[type] = _split_type_hint(type_hint)
        field["type"] = _type_hints_to_name(type_hints)
        last_type_hint: type = type_hints[-1]
        if is_struct(last_type_hint):
            field["fields"] = METHOD_NAME(last_type_hint)
        fields.append(field)
    return fields