code: def factorial(n):
      """
      Factorial function of a scalar or array of numbers.
  
      """
      return gamma(n + 1)
  
imports: from textwrap import dedent
  import numpy
  import scipy
  from pytensor.graph.basic import Apply
  from pytensor.graph.replace import _vectorize_node
  from pytensor.link.c.op import COp
  from pytensor.tensor.basic import as_tensor_variable
  from pytensor.tensor.elemwise import get_normalized_batch_axes
  from pytensor.tensor.math import gamma, gammaln, neg, sum
label_desc: Use image node_id 5 for calling a global function with example usage: factorial(n) and returns: gamma