def __init__(self, fname_or_conn):
if isinstance(fname_or_conn, string_types):<EOL><INDENT>if os.path.isfile(fname_or_conn):<EOL><INDENT>self.conn = sqlite3.connect(fname_or_conn)<EOL>self.fname = fname_or_conn<EOL>self.conn.execute('<STR_LIT>')<EOL>self.conn.execute('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>raise FileNotFoundError("<STR_LIT>" + fname_or_conn + "<STR_LIT>")<EOL><DEDENT><DEDENT>elif isinstance(fname_or_conn, sqlite3.Connection):<EOL><INDENT>self.conn = fname_or_conn<EOL>self._dont_close = True<EOL><DEDENT>else:<EOL><INDENT>raise NotImplementedError(<EOL>"<STR_LIT>" + str(type(fname_or_conn)) + "<STR_LIT>")<EOL><DEDENT>assert self.conn.execute("<STR_LIT>").fetchone() is not None<EOL>self.meta = GTFSMetadata(self.conn)<EOL>self.conn.create_function("<STR_LIT>", <NUM_LIT:4>, wgs84_distance)<EOL>self._timezone = pytz.timezone(self.get_timezone_name())<EOL>
Open a GTFS object

        Parameters
        ----------
        fname_or_conn: str | sqlite3.Connection
            path to the preprocessed gtfs database or a connection to a gtfs database