<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _compile_fragment_ast(schema, current_schema_type, ast, location, context):
 """Return a list of basic blocks corresponding to the inline fragment at this AST node. Args: schema: GraphQL schema object, obtained from the graphql library current_schema_type: GraphQLType, the schema type at the current location ast: GraphQL AST node, obtained from the graphql library. location: Location object representing the current location in the query context: dict, various per-compilation data (e.g. declared tags, whether the current block is optional, etc.). May be mutated in-place in this function! Returns: list of basic blocks, the compiled output of the vertex AST node """

    query_metadata_table = context['metadata']

    # step F-2. Emit a type coercion block if appropriate,
    #           then recurse into the fragment's selection.
    coerces_to_type_name = ast.type_condition.name.value
    coerces_to_type_obj = schema.get_type(coerces_to_type_name)

    basic_blocks = []

    # Check if the coercion is necessary.
    # No coercion is necessary if coercing to the current type of the scope,
    # or if the scope is of union type, to the base type of the union as defined by
    # the type_equivalence_hints compilation parameter.
    is_same_type_as_scope = current_schema_type.is_same_type(coerces_to_type_obj)
    equivalent_union_type = context['type_equivalence_hints'].get(coerces_to_type_obj, None)
    is_base_type_of_union = (
        isinstance(current_schema_type, GraphQLUnionType) and
        current_schema_type.is_same_type(equivalent_union_type)
    )

    if not (is_same_type_as_scope or is_base_type_of_union):
        # Coercion is required.
        query_metadata_table.record_coercion_at_location(location, coerces_to_type_obj)
        basic_blocks.append(blocks.CoerceType({coerces_to_type_name}))

    inner_basic_blocks = _compile_ast_node_to_ir(
        schema, coerces_to_type_obj, ast, location, context)
    basic_blocks.extend(inner_basic_blocks)

    return basic_blocks