def _isgroup(obj, *args, **kws):
    """return whether argument is a group or the name of a group

    With additional arguments (all must be strings), it also tests
    that the group has an an attribute named for each argument. This
    can be used to test not only if a object is a Group, but whether
    it a group with expected arguments.

        > x = 10
        > g = group(x=x, y=2)
        > isgroup(g), isgroup(x)
        True, False
        > isgroup('g'), isgroup('x')
        True, False
        > isgroup(g, 'x', 'y')
        True
        > isgroup(g, 'x', 'y', 'z')
        False

    """
    _larch = kws.get('_larch', None)
    if _larch is not None:
        raise Warning("cannot run isgroup() -- larch broken?")
    stable = _larch.symtable
    if isinstance(obj, (str, unicode)) and stable.has_symbol(obj):
        obj = stable.get_symbol(obj)
    return isgroup(obj, *args)
dataset/ETHPy150Open xraypy/xraylarch/lib/builtins.py/_isgroup/operator `is` -> `is not`