def decode(data):
<EOL>dialect = None<EOL>try:<EOL><INDENT>dialect = csv.Sniffer().sniff(data)<EOL><DEDENT>except Exception:<EOL><INDENT>pass<EOL><DEDENT>handler = None<EOL>try:<EOL><INDENT>data = data.splitlines()  <EOL>handler = csv.reader(data, dialect)<EOL><DEDENT>except Exception as e:<EOL><INDENT>raise MetaParsingException("<STR_LIT>" % e.message)<EOL><DEDENT>decoded = []<EOL>for cnt, line in enumerate(handler):<EOL><INDENT>usable_data = [x for x in line if x.strip()]<EOL>if not usable_data:<EOL><INDENT>continue<EOL><DEDENT>if len(usable_data) != <NUM_LIT:2>:<EOL><INDENT>raise MetaParsingException(<EOL>"<STR_LIT>" % (cnt, data[cnt])<EOL>)<EOL><DEDENT>usable_data = [x.strip().decode("<STR_LIT:utf-8>") for x in usable_data]<EOL>usable_data = [_remove_quotes(x) for x in usable_data]<EOL>decoded.append(usable_data)<EOL><DEDENT>decoded = validator.check_structure(decoded)<EOL>return decoded<EOL>
Handles decoding of the CSV `data`.

Args:
    data (str): Data which will be decoded.

Returns:
    dict: Dictionary with decoded data.