code: def determine_xsi_type_override(field_data, field_def)
        result = nil
        if field_data.kind_of?(Hash) and field_data.include?(:xsi_type)
          result = field_data[:xsi_type]
        end
        return result
      end
docs: Determines an xsi:type override for for the field. Returns nil if no
   override found.