code: def instantiate_object(self, object_type, parent):
          
          ZenpyClass = self.class_for_type(object_type)
          obj = ZenpyClass(api=self.api)
          if parent:
              def dirty_callback():
                  parent._dirty = True
                  obj._dirty = True
  
              obj._dirty_callback = dirty_callback
          obj._always_dirty.update(self.always_dirty.get(object_type, []))
          return obj
docs: Instantiate a Zenpy object. If this object has a parent, add a callback to call the parent if it is modified.
          This is so the parent object is correctly marked as dirty when a child is modified, eg:
  
              view.conditions.all.append(<something>)
  
          Also, some attributes need to be sent together to Zendesk together if either is modified. For example,
          Condition objects need to send both "all" and "any", even if only one has changed. If we have such values
          configured, add them. They will be inspected in the objects to_dict method on serialization.