def GetAllFieldInDocument(document, field_name):
 fields = []
 for f in document.field_list():
  if (f.name() == field_name):
   fields.append(f)
 return fields

def GetAllFieldInDocument ( document , field_name ) : fields = [ ] for f in document . field_list ( ) : if ( f . name ( ) == field_name ) : fields . append ( f ) return fields
find and return all fields with the provided name in the document .