(lhs: Any, super_schema: JSON_TYPE)
Validate that lhs is an instance of or a subschema of super_schema.

    Parameters
    ----------
    lhs: value
        Left-hand side of instance or subschema check.

    super_schema: JSON schema
        Right-hand side of instance or subschema check.

    Raises
    ------
    jsonschema.ValidationError
        The lhs was an invalid value for super_schema.

    SubschemaError
        The lhs had a schema that was not a subschema of super_schema.
Validate that lhs is an instance of or a subschema of super_schema.
Validate that lhs is an instance of or a subschema of super_schema .
def validate_schema(lhs: Any, super_schema: JSON_TYPE):
    """Validate that lhs is an instance of or a subschema of super_schema.

    Parameters
    ----------
    lhs: value
        Left-hand side of instance or subschema check.

    super_schema: JSON schema
        Right-hand side of instance or subschema check.

    Raises
    ------
    jsonschema.ValidationError
        The lhs was an invalid value for super_schema.

    SubschemaError
        The lhs had a schema that was not a subschema of super_schema.
    """
    from lale.settings import disable_data_schema_validation

    if disable_data_schema_validation:
        return True  # If schema validation is disabled, always return as valid
    sub_schema: Optional[JSON_TYPE]
    import lale.datasets.data_schemas

    try:
        sub_schema = lale.datasets.data_schemas.to_schema(lhs)
    except ValueError:
        sub_schema = None
    if sub_schema is None:
        validate_schema_directly(lhs, super_schema)
    else:
        _validate_subschema(sub_schema, super_schema)
def validate_schema ( lhs : Any , super_schema : JSON_TYPE ) : from lale . settings import disable_data_schema_validation if disable_data_schema_validation : return True # If schema validation is disabled, always return as valid sub_schema : Optional [ JSON_TYPE ] import lale . datasets . data_schemas try : sub_schema = lale . datasets . data_schemas . to_schema ( lhs ) except ValueError : sub_schema = None if sub_schema is None : validate_schema_directly ( lhs , super_schema ) else : _validate_subschema ( sub_schema , super_schema )