code: def _prod(dims):
      p = 1
      for v in dims:
          p *= v
      return p
  
imports: import time
  import torch
  import torch.nn
  import torch.nn.functional
  from functools import partial
  from typing import List, Optional
  from collections import OrderedDict
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: _prod(dims) and returns: p