def _make_text(text_format, input_dict):
    """
    Create a string from the values in input dictionary according to the specified formatting string or function

    :param text_format: string template or function returning the text to be printed inside each bin
    :type text_format: `str` or `function`

    :param input_dict: dictionary containing the following keys: `'nominal'`, `'uncert_up'`, `'uncert_down'`, `'stat_up'`, `'stat_down'`, `'syst_up'`, `'syst_down'`
    :type input_dict: `dict`
    """
    if isinstance(text_format, str):
        return text_format.format(**input_dict)
    return text_format(**input_dict)
