def feature_from_line(line, dialect=None, strict=True, keep_order=False):
    if not strict:
        lines = line.splitlines(False)
        _lines = []
        for i in lines:
            i = i.strip()
            if len(i) > 0:
                _lines.append(i)
        assert len(_lines) == 1, _lines
        line = _lines[0]
        if '\t' in line:
            fields = line.rstrip('\n\r').split('\t')
        else:
            fields = line.rstrip('\n\r').split(None, 8)
    else:
        fields = line.rstrip('\n\r').split('\t')
    try:
        attr_string = fields[8]
    except IndexError:
        attr_string = ""
    attrs, _dialect = parser._split_keyvals(attr_string, dialect=dialect)
    d = dict(list(zip(constants._gffkeys, fields)))
    d['attributes'] = attrs
    d['extra'] = fields[9:]
    d['keep_order'] = keep_order
    if dialect is None:
        dialect = _dialect
    return Feature(dialect=dialect, **d)