def METHOD_NAME(self):
    """Recursively convert struct fields+values to nested dictionaries.
    """
    fields = self.fields.copy()
    for k, v in fields.items():
        if isinstance(v, StructArray):
            fields[k] = [x.METHOD_NAME() for x in v.array]
        elif isinstance(v, Struct):
            fields[k] = v.METHOD_NAME()
    return fields