import textwrap


def heredoc(s, inputs_dict):
    """
    Use docstrings to specify a multi-line string literal.

    Args:
        s (str): docstring with named placeholders for replacement.
        inputs_dict (dict): dict with keys corresponding to placeholders
            in docstring `s` and values to insert.

    Returns:
        str: string with placeholders replaced with corresponding values
            and any linebreaks preserved.
    """
    s = textwrap.dedent(s).format(**inputs_dict)
    return s[1:] if s.startswith('\n') else s