def read_series_matrix(path, encoding):
assert isinstance(path, str)<EOL>accessions = None<EOL>titles = None<EOL>celfile_urls = None<EOL>with misc.smart_open_read(path, mode='<STR_LIT:rb>', try_gzip=True) as fh:<EOL><INDENT>reader = csv.reader(fh, dialect='<STR_LIT>', encoding=encoding)<EOL>for l in reader:<EOL><INDENT>if not l:<EOL><INDENT>continue<EOL><DEDENT>if l[<NUM_LIT:0>] == '<STR_LIT>':<EOL><INDENT>accessions = l[<NUM_LIT:1>:]<EOL><DEDENT>elif l[<NUM_LIT:0>] == '<STR_LIT>':<EOL><INDENT>titles = l[<NUM_LIT:1>:]<EOL><DEDENT>elif l[<NUM_LIT:0>] == '<STR_LIT>' and celfile_urls is None:<EOL><INDENT>celfile_urls = l[<NUM_LIT:1>:]<EOL><DEDENT>elif l[<NUM_LIT:0>] == '<STR_LIT>':<EOL><INDENT>break<EOL><DEDENT><DEDENT><DEDENT>return accessions, titles, celfile_urls<EOL>
Read the series matrix.