from textwrap import dedent


def _create_docstring(header):
    """Removes the shebang and all initial comment characters before
    it joins and dedents teh lines

    :param header: header lines
    :type header: list of strings
    """
    if header and len(header) > 0:
        head_of = 0 if not header[0].startswith("#!") else 1
        lines = []
        for h in header[head_of:]:
            if len(h) > 0:
                if h[0] == "#":
                    h = h[1:]
            lines.append(h)
        return dedent("\n".join(lines))
    return ""