def fmt(
    f: str,
    v: dict,
    c: str = 'csl',
) -> str:
    """
    Return the elements of v selected and ordered by f.

    Input:
        f (str): format
        v (dict): dictionary containing the parameters
        c (str): context

    Output:
        s (str): elements of v selected and ordered by f
    """
    if c == 'stm':
        sep = '_'
    else:
        sep = " "
    return sep.join([v[n] for n in f if not v[n] is None])