def parse_schema(yaml_schema: str) -> Tuple[str, Dict[str, SchemaFieldType]]:
    """Parses yaml schema.

    Ensures that schema is well-formed and returns dictionary of properties and
    its type for type-checking.

    Args:
      yaml_schema: Yaml schema to be parsed.

    Returns:
      str: Title set in the schema.
      Dict: Property name to SchemaFieldType enum.

    Raises:
      ValueError if title field is not set in schema or an
        unsupported(i.e. not defined in SchemaFieldType)
        type is specified for the field.
    """

    schema = yaml.full_load(yaml_schema)
    if 'title' not in schema.keys():
        raise ValueError('Invalid _schema, title must be set. \
      Got: {}'.format(yaml_schema))

    title = schema['title']
    properties = {}
    if 'properties' in schema.keys():
        schema_properties = schema['properties'] or {}
        for property_name, property_def in schema_properties.items():
            try:
                properties[property_name] = SchemaFieldType(
                    property_def['type'])
            except ValueError:
                raise ValueError('Unsupported type:{} specified for field: {} \
          in schema'.format(property_def['type'], property_name))

    return title, properties