<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def make_single_header(context: TraceContext) -> Headers: """Creates dict with zipkin single header format. """

    # b3={TraceId}-{SpanId}-{SamplingState}-{ParentSpanId}
    c = context

    # encode sampled flag
    if c.debug:
        sampled = 'd'
    elif c.sampled:
        sampled = '1'
    else:
        sampled = '0'

    params = [c.trace_id, c.span_id, sampled]  # type: List[str]
    if c.parent_id is not None:
        params.append(c.parent_id)

    h = DELIMITER.join(params)
    headers = {SINGLE_HEADER: h}
    return headers