def members(self, type=None):
    op = operator.eq
    other = 'typeId'
    if isinstance(type, string_types):
        other = 'typeName'
    if isinstance(type, (tuple, list)):
        op = operator.contains
    for node in (cmds.sets(self.name(namespace=True), query=True) or []):
        node = encode(node)
        if ((not type) or op(type, getattr(node._fn, other))):
            (yield node)
def members(self, type=None):
    op = operator.eq
    other = 'typeId'
    if isinstance(type, string_types):
        other = 'typeName'
    if isinstance(type, (tuple, list)):
        op = operator.contains
    for node in (cmds.sets(self.name(namespace=True), query=True) or []):
        node = encode(node)
        if ((not type) or op(type, getattr(node._fn, other))):
            (yield node)