def skip_comment_block(fd, comment_symbol):
    """Reads the initial lines of the file (represented by the file descriptor) corresponding to a comment block.
    All consecutive lines starting with the given symbol are considered to be part of the comment block.
    """

    comment_block = ''

    line_beg = fd.tell()
    line = fd.readline()
    while line != '':
        if not line.startswith(comment_symbol):
            fd.seek(line_beg)
            break

        comment_block += line
        line_beg = fd.tell()
        line = fd.readline()

    return fd, comment_block