code: def benchmark_1():
      x = np.random.randn(10000, 1000) * 0.01
      idx = pd.date_range("1990-01-01", freq="B", periods=x.shape[0])
      data = np.exp(pd.DataFrame(x, index=idx).cumsum())
  
      s = bt.Strategy(
          "s",
          [
              bt.algos.RunMonthly(),
              bt.algos.SelectRandomly(len(data.columns) / 2),
              bt.algos.WeighRandomly(),
              bt.algos.Rebalance(),
          ],
      )
  
      t = bt.Backtest(s, data)
      return bt.run(t)
  
imports: import numpy
  import pandas
  import bt
  import cProfile
label_desc: Use image node_id 1 for calling a global function with example usage: benchmark_1() and returns: bt