def add_hierarch(lis):
    """
    Convert in correct format for fits header.

    Parameters
    ----------
    lis: list of tuples
        Contains tuples (keyword, value [, comment]).

    Returns
    ----------
    lis : list of strings
        Contains strings in the pyfits header format.

    Examples
    ----------
    >>> lis = [['toto', 3, 'I am a comment']]
    >>> add_hierarch(lis)
    [('HIERARCH toto', 3, 'I am a comment')]
    """
    for i, item in enumerate(lis):
        if len(item) == 3:
            lis[i] = 'HIERARCH ' + item[0], item[1], item[2]
        else:
            lis[i] = 'HIERARCH ' + item[0], item[1]
    return lis
