def METHOD_NAME(self, sequence):
    for command in sequence:
        obj = getattr(self, "_cmd_api_%s" % command, None)
        if not getattr(obj, "_is_standalone", False):
            if not hasattr(self, "_cmd_implementation_%s" % command):
                continue
        check_f = getattr(self, "_cmd_check_support_%s" % command, None)
        if check_f is not None and not check_f():
            continue
        yield command