def build_header_prefixes(prefixes):
    """
    Write turtle-formatted header prefix string for given list of (prefix,
    iri) tuples.

    Parameter
    ---------
    prefixes: list of 2-tuples
        each tuple is a prefix string and an iri string

    Returns
    -------
    header_prefix: string
    """
    header_prefix = ""
    for prefix in prefixes:
        header_prefix = """{0}@prefix {1}: <{2}> .
""".format(
            header_prefix,
            prefix[0],
            prefix[1]
        )
    header_prefix = """{0}@base <{1}> .
""".format(
        header_prefix,
        prefixes[0][1][:-1]
    )
    return(header_prefix)