code: def compute_option_prices(
      stock_price,
      option_strike,
      option_years,
      risk_free,
      volatility,
      n_threads_per_option,
      n_samples_per_thread,
      seed=0,
  ):
      n_options = len(stock_price)
      call_prices = cupy.empty(
          (n_options, n_threads_per_option), dtype=numpy.float64
      )
      # Because of the broadcasting rule, in this case this kernel
      # launches n_options * n_threads_per_options threads
      # each of which corresponds to the element of 'call_prices'.
      monte_carlo_kernel(
          stock_price[:, None],
          option_strike[:, None],
          option_years[:, None],
          risk_free,
          volatility,
          n_samples_per_thread,
          seed,
          call_prices,
      )
      return call_prices.mean(axis=1)
  
file_path: cupy/examples/finance/monte_carlo.py
imports: import argparse
  import contextlib
  import sys
  import time
  import cupy
  import numpy
  from black_scholes import black_scholes_kernel
label_desc: Use image node_id 1 for calling a global function with example usage: compute_option_prices(stock_price, option_strike, option_years, risk_free, volatility, n_threads_per_option, n_samples_per_thread, seed) and returns: call_prices