def parent(self, type=None):
    'Return parent of node\n\n        Arguments:\n            type (str, optional): Return parent, only if it matches this type\n\n        Example:\n            >>> parent = createNode("transform")\n            >>> child = createNode("transform", parent=parent)\n            >>> child.parent() == parent\n            True\n            >>> not child.parent(type="camera")\n            True\n            >>> parent.parent()\n\n        '
    mobject = self._fn.parent(0)
    if (mobject.apiType() == om.MFn.kWorld):
        return
    cls = self.__class__
    if ((not type) or (type == self._fn.__class__(mobject).typeName)):
        return cls(mobject)
Return parent of node

Arguments:
    type (str, optional): Return parent, only if it matches this type

Example:
    >>> parent = createNode("transform")
    >>> child = createNode("transform", parent=parent)
    >>> child.parent() == parent
    True
    >>> not child.parent(type="camera")
    True
    >>> parent.parent()
def parent(self, type=None):
    'Return parent of node\n\n        Arguments:\n            type (str, optional): Return parent, only if it matches this type\n\n        Example:\n            >>> parent = createNode("transform")\n            >>> child = createNode("transform", parent=parent)\n            >>> child.parent() == parent\n            True\n            >>> not child.parent(type="camera")\n            True\n            >>> parent.parent()\n\n        '
    mobject = self._fn.parent(0)
    if (mobject.apiType() == om.MFn.kWorld):
        return
    cls = self.__class__
    if ((not type) or (type == self._fn.__class__(mobject).typeName)):
        return cls(mobject)