code: def IsValidForDescriptor(self, message_descriptor):
      
      for path in self.paths:
        if not _IsValidPath(message_descriptor, path):
          return False
      return True
docs: Checks whether the FieldMask is valid for Message Descriptor.