def _kind(kind, expr):
    """
    Build a `kind(...)` type query expression.

    `kind` is a regex that matches on the rule type.
    `epxr` is a query expression of any supported type.
    """
    return "kind('{}', {})".format(kind, expr)