new_contents: def copyAttributes(fromFeature, toFeature):
      for i in range(fromFeature.GetFieldCount()):
          fieldName = fromFeature.GetFieldDefnRef(i).GetName()
          toFeature.SetField(fieldName,fromFeature.GetField(fieldName))
  
subject: Create Py_GDAL_copy_attributes.py