def IsDirty(self, proto):
    if proto.dirty:
      return True

    for python_format, _, type_descriptor in proto.GetRawData().itervalues():
      if python_format is not None and type_descriptor.IsDirty(python_format):
        proto.dirty = True
        return True

    return False
Return and clear the dirty state of the python object.
dataset/ETHPy150Open google/grr/grr/lib/rdfvalues/structs.py/ProtoEmbedded.IsDirty