from typing import OrderedDict


def attributes_to_odict_gff(attributes):
    """
    Parse the GFF attribute column and return a dict
    """

    if attributes == ".":
        return OrderedDict()

    ret_gff = OrderedDict()
    for attribute in attributes.strip().split(";"):
        if len(attribute):
            elems = attribute.strip().split('=')
            key = elems[0]
            val = ','.join(elems[1:])

            ret_gff[key] = val

    return ret_gff