def normalize_output_field(field_data, field_def)
      return case field_data
        when Array
          normalize_array_field(field_data, field_def)
        when Hash
          normalize_hash_field(field_data, field_def)
        else
          normalize_item(field_data, field_def)
      end
    end
def normalize_output_field(field_data, field_def)
      return case field_data
        when Array
          normalize_array_field(field_data, field_def)
        when Hash
          normalize_hash_field(field_data, field_def)
        else
          normalize_item(field_data, field_def)
      end
    end
Normalizes one field of a given data recursively.

 Args:
  - field_data: XML data to normalize
  - field_def: field type definition for the data