def read_series_matrix(path):
assert isinstance(path, str)<EOL>accessions = None<EOL>names = 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>')<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>names = l[<NUM_LIT:1>:]<EOL><DEDENT>elif l[<NUM_LIT:0>] == '<STR_LIT>':<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, names, celfile_urls<EOL>
Extracts sample information from a GEO series matrix file.

    The extracted information consists of sample accessions, names, and raw
    data URLs.

    Parameters
    ----------
    path: str
        The series matrix file. Can be gzip'ed.

    Returns
    -------
    3-tuple (accessions, titles, raw data URLs)