def children(self, type=None, filter=om.MFn.kTransform, query=None, contains=None):
    'Return children of node\n\n        All returned children are transform nodes, as specified by the\n        `filter` argument. For shapes, use the :func:`shapes` method.\n        The `contains` argument only returns transform nodes containing\n        a shape of the type provided.\n\n        Arguments:\n            type (str, optional): Return only children that match this type\n            filter (int, optional): Return only children with this function set\n            contains (str, optional): Child must have a shape of this type\n            query (dict, optional): Limit output to nodes with these attributes\n\n        Example:\n            >>> _ = cmds.file(new=True, force=True)\n            >>> a = createNode("transform", "a")\n            >>> b = createNode("transform", "b", parent=a)\n            >>> c = createNode("transform", "c", parent=a)\n            >>> d = createNode("mesh", "d", parent=c)\n            >>> list(a.children()) == [b, c]\n            True\n            >>> a.child() == b\n            True\n            >>> c.child(type="mesh")\n            >>> c.child(type="mesh", filter=None) == d\n            True\n            >>> c.child(type=("mesh", "transform"), filter=None) == d\n            True\n            >>> a.child() == b\n            True\n            >>> a.child(contains="mesh") == c\n            True\n            >>> a.child(contains="nurbsCurve") is None\n            True\n            >>> b["myAttr"] = Double(default=5)\n            >>> a.child(query=["myAttr"]) == b\n            True\n            >>> a.child(query=["noExist"]) is None\n            True\n            >>> a.child(query={"myAttr": 5}) == b\n            True\n            >>> a.child(query={"myAttr": 1}) is None\n            True\n\n        '
    if self.isA(kShape):
        return
    cls = DagNode
    Fn = self._fn.__class__
    op = operator.eq
    if isinstance(type, (tuple, list)):
        op = operator.contains
    other = ('typeId' if isinstance(type, om.MTypeId) else 'typeName')
    for index in range(self._fn.childCount()):
        try:
            mobject = self._fn.child(index)
        except RuntimeError:
            log.warning(('Child %d of %s not found, this is a bug' % (index, self)))
            raise
        if ((filter is not None) and (not mobject.hasFn(filter))):
            continue
        if ((not type) or op(type, getattr(Fn(mobject), other))):
            node = cls(mobject)
            if ((not contains) or node.shape(type=contains)):
                if (query is None):
                    (yield node)
                elif isinstance(query, dict):
                    try:
                        if all(((node[key] == value) for (key, value) in query.items())):
                            (yield node)
                    except ExistError:
                        continue
                elif all(((key in node) for key in query)):
                    (yield node)
Return children of node

All returned children are transform nodes, as specified by the
`filter` argument. For shapes, use the :func:`shapes` method.
The `contains` argument only returns transform nodes containing
a shape of the type provided.

Arguments:
    type (str, optional): Return only children that match this type
    filter (int, optional): Return only children with this function set
    contains (str, optional): Child must have a shape of this type
    query (dict, optional): Limit output to nodes with these attributes

Example:
    >>> _ = cmds.file(new=True, force=True)
    >>> a = createNode("transform", "a")
    >>> b = createNode("transform", "b", parent=a)
    >>> c = createNode("transform", "c", parent=a)
    >>> d = createNode("mesh", "d", parent=c)
    >>> list(a.children()) == [b, c]
    True
    >>> a.child() == b
    True
    >>> c.child(type="mesh")
    >>> c.child(type="mesh", filter=None) == d
    True
    >>> c.child(type=("mesh", "transform"), filter=None) == d
    True
    >>> a.child() == b
    True
    >>> a.child(contains="mesh") == c
    True
    >>> a.child(contains="nurbsCurve") is None
    True
    >>> b["myAttr"] = Double(default=5)
    >>> a.child(query=["myAttr"]) == b
    True
    >>> a.child(query=["noExist"]) is None
    True
    >>> a.child(query={"myAttr": 5}) == b
    True
    >>> a.child(query={"myAttr": 1}) is None
    True
def children(self, type=None, filter=om.MFn.kTransform, query=None, contains=None):
    'Return children of node\n\n        All returned children are transform nodes, as specified by the\n        `filter` argument. For shapes, use the :func:`shapes` method.\n        The `contains` argument only returns transform nodes containing\n        a shape of the type provided.\n\n        Arguments:\n            type (str, optional): Return only children that match this type\n            filter (int, optional): Return only children with this function set\n            contains (str, optional): Child must have a shape of this type\n            query (dict, optional): Limit output to nodes with these attributes\n\n        Example:\n            >>> _ = cmds.file(new=True, force=True)\n            >>> a = createNode("transform", "a")\n            >>> b = createNode("transform", "b", parent=a)\n            >>> c = createNode("transform", "c", parent=a)\n            >>> d = createNode("mesh", "d", parent=c)\n            >>> list(a.children()) == [b, c]\n            True\n            >>> a.child() == b\n            True\n            >>> c.child(type="mesh")\n            >>> c.child(type="mesh", filter=None) == d\n            True\n            >>> c.child(type=("mesh", "transform"), filter=None) == d\n            True\n            >>> a.child() == b\n            True\n            >>> a.child(contains="mesh") == c\n            True\n            >>> a.child(contains="nurbsCurve") is None\n            True\n            >>> b["myAttr"] = Double(default=5)\n            >>> a.child(query=["myAttr"]) == b\n            True\n            >>> a.child(query=["noExist"]) is None\n            True\n            >>> a.child(query={"myAttr": 5}) == b\n            True\n            >>> a.child(query={"myAttr": 1}) is None\n            True\n\n        '
    if self.isA(kShape):
        return
    cls = DagNode
    Fn = self._fn.__class__
    op = operator.eq
    if isinstance(type, (tuple, list)):
        op = operator.contains
    other = ('typeId' if isinstance(type, om.MTypeId) else 'typeName')
    for index in range(self._fn.childCount()):
        try:
            mobject = self._fn.child(index)
        except RuntimeError:
            log.warning(('Child %d of %s not found, this is a bug' % (index, self)))
            raise
        if ((filter is not None) and (not mobject.hasFn(filter))):
            continue
        if ((not type) or op(type, getattr(Fn(mobject), other))):
            node = cls(mobject)
            if ((not contains) or node.shape(type=contains)):
                if (query is None):
                    (yield node)
                elif isinstance(query, dict):
                    try:
                        if all(((node[key] == value) for (key, value) in query.items())):
                            (yield node)
                    except ExistError:
                        continue
                elif all(((key in node) for key in query)):
                    (yield node)