def parse_gff_attributes(attr_str):
    """
    Parse GFF3 attribute column and return a dict with all attributes.
    :param attr_str:
    :type attr_str:
    :return: dictionary of attributes
    :rtype: dict
    """
    retval = dict()     # return value
    if attr_str == ".":
        return {}
    for attr in attr_str.split(";"):
        if not attr: continue
        key, value = attr.split("=")
        # if we want decoding of the URL-encoded string we can use
        # retval[urllib.unquote(key)] = urllib.unquote(value)
        # but we do not need it
        retval[key] = value
    return retval