code: def ElemwiseOpTime(N, script=False, loops=1000):
      x = vector("x")
      np.random.seed(1235)
      v = np.random.random(N).astype(config.floatX)
      f = pytensor.function([x], 2 * x + x * x)
      f1 = pytensor.function([x], tanh(x))
      # Don't waste time filtering inputs
      f.trust_input = True
      f1.trust_input = True
      if not script:
          if config.openmp:
              print("With openmp:")
          print("Fast op ", end=" ")
      ceapTime = evalTime(f, v, script=script, loops=loops)
      if not script:
          print("Slow op ", end=" ")
      costlyTime = evalTime(f1, v, script=script, loops=loops)
      return (ceapTime, costlyTime)
  
file_path: pytensor/pytensor/misc/elemwise_time_test.py
imports: import sys
  import time
  from optparse import OptionParser
  import numpy
  import pytensor
  from pytensor.configdefaults import config
  from pytensor.tensor.math import tanh
  from pytensor.tensor.type import vector
label_desc: Use image node_id 2 for calling a global function with example usage: ElemwiseOpTime(N, script, loops) and returns: ceapTime,  costlyTime