def METHOD_NAME(recipe, schema):
    """This is a custom validator for validating JSON documents. We implement a
    custom resolver using `RefResolver <https://python-jsonschema.readthedocs.io/en/stable/references/#jsonschema.RefResolver>`_
    to find schemas locally in order to validate buildspecs with schema files on local filesystem. This ensures changes to
    schema can be done in sync with change to code base.
    This method uses `Draft7Validator <https://python-jsonschema.readthedocs.io/en/stable/validate/#jsonschema.Draft7Validator>`_
    for validating schemas. If there is an error during validation jsonschema will raise an exception of type
    `jsonschema.exceptions.ValidationError <https://python-jsonschema.readthedocs.io/en/stable/errors/#jsonschema.exceptions.ValidationError>`_
    Args:
        recipe (dict): Loaded test recipe as YAML document
        schema (dict): Schema document loaded in JSON format
    Raises:
        jsonschema.exceptions.ValidationError: if recipe fails to validate with schema
    """
    # making sure input recipe and schema are dictionary
    assert isinstance(recipe, dict)
    assert isinstance(schema, dict)
    validator = Draft7Validator(schema, resolver=resolver)
    validator.validate(recipe)