def _parse_top_section(line):
    """
    Returns a top-level section name ("PATH", "GEM", "PLATFORMS",
    "DEPENDENCIES", etc.), or `None` if the line is empty or contains leading
    space.
    """

    if line == "" or line[0].isspace():
        return None

    return line