def METHOD_NAME(tensor, prefix, *, tsfc_parameters=None):
    """Compiles the TSFC form associated with a Slate :class:`~.Tensor`
    object. This function will return a :class:`ContextKernel`
    which stores information about the original tensor, integral types
    and the corresponding TSFC kernels.
    :arg tensor: A Slate `~.Tensor`.
    :arg prefix: An optional `string` indicating the prefix for the
                 subkernel.
    :arg tsfc_parameters: An optional `dict` of parameters to provide
                          TSFC.
    Returns: A `ContextKernel` containing all relevant information.
    """
    assert tensor.terminal, (
        "Only terminal tensors have forms associated with them!"
    )
    # Sets a default name for the subkernel prefix.
    mapper = RemoveRestrictions()
    integrals = map(partial(map_integrand_dags, mapper),
                    tensor.form.integrals())
    transformed_integrals = transform_integrals(integrals)
    cxt_kernels = []
    assert prefix is not None
    for orig_it_type, integrals in transformed_integrals.items():
        subkernel_prefix = prefix + "%s_to_" % orig_it_type
        form = Form(integrals)
        kernels = tsfc_compile(form,
                               subkernel_prefix,
                               parameters=tsfc_parameters,
                               split=False, diagonal=tensor.diagonal)
        if kernels:
            cxt_k = ContextKernel(tensor=tensor,
                                  coefficients=form.coefficients(),
                                  constants=extract_firedrake_constants(form),
                                  original_integral_type=orig_it_type,
                                  tsfc_kernels=kernels)
            cxt_kernels.append(cxt_k)
    cxt_kernels = tuple(cxt_kernels)
    return cxt_kernels