def METHOD_NAME(context, pkgs, *args):
    if not SCons.Util.is_List(pkgs):
        pkgs = [pkgs]
    assert pkgs
    for pkg in pkgs:
        context.Message(f"Checking for pkg-config package {pkg}... ")
        ret = context.TryAction(f"pkg-config {pkg}")[0]
        if not ret:
            context.Result(ret)
            continue
        if len(args) == 0:
            break
        cmd = " ".join(["pkg-config"] + list(args) + [pkg])
        try:
            context.env.ParseConfig(cmd)
            ret = 1
            context.Result(ret)
            break
        except Exception as e:
            ret = 0
            context.Result(ret)
    return ret