def instantiate_object(self, object_type, parent):
ZenpyClass = self.class_for_type(object_type)<EOL>obj = ZenpyClass(api=self.api)<EOL>if parent:<EOL><INDENT>def dirty_callback():<EOL><INDENT>parent._dirty = True<EOL>obj._dirty = True<EOL><DEDENT>obj._dirty_callback = dirty_callback<EOL><DEDENT>obj._always_dirty.update(self.always_dirty.get(object_type, []))<EOL>return obj<EOL>
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.