def get_session() -> core_session.TruSession:
    """Parse command line arguments and initialize TruSession with them.

    As TruSession is a singleton, further TruSession() uses will get the same configuration.
    """

    parser = argparse.ArgumentParser()
    parser.add_argument("--database-url", default=None)
    parser.add_argument("--sis-compatibility", action="store_true")
    parser.add_argument(
        "--database-prefix", default=core_db.DEFAULT_DATABASE_PREFIX
    )
    parser.add_argument(
        "--otel-tracing",
        action="store_true",
        help="Enable OTEL tracing in the dashboard",
    )

    try:
        args = parser.parse_args()
    except SystemExit as e:
        print(e)

        # This exception will be raised if --help or invalid command line arguments
        # are used. Currently, streamlit prevents the program from exiting normally,
        # so we have to do a hard exit.
        sys.exit(e.code)

    session = core_session.TruSession(
        database_url=args.database_url, database_prefix=args.database_prefix
    )

    if args.sis_compatibility:
        session.experimental_enable_feature(
            mod_experimental.Feature.SIS_COMPATIBILITY
        )

    # Store the otel_tracing flag in the session state
    if args.otel_tracing:
        os.environ["TRULENS_OTEL_TRACING"] = "1"

    return session
Parse command line arguments and initialize TruSession with them.

    As TruSession is a singleton, further TruSession() uses will get the same configuration.
    
src/dashboard/trulens/dashboard/utils/dashboard_utils.py