Convert a parsed teleport schema to a val schema.

def to_val(teleport_schema):
    """Convert a parsed teleport schema to a val schema."""
    translated = _translate(teleport_schema)
    if isinstance(translated, BaseSchema):
        return translated

    return Schema(translated)