code: def find_func_param(
      func, name=None, shape=None, allow_not_found=False
  ):
      """
      Find a single parameter in a function by name or by shape when the function has multiple parameters.
      If the function only has one parameter it's directly returned.
  
      Args:
          func (:class:`~cntk.ops.functions.Function`): The function to search parameter for
          name (string) : The name of the parameter
          shape (tuple): The shape of the parameter
          allow_not_found (bool): Set to True to avoid raise exception when not found
  
      Returns:
          The :class:`~cntk.variables.Parameter` that is found
      """
      if len(func.parameters) == 1:
          return func.parameters[0]
      found = [
          p
          for p in func.parameters
          if (shape and p.shape == shape) or name == p.name
      ]
      if not found:
          if allow_not_found:
              return None
          else:
              raise Exception(
                  "param ({} {}) not found".format(name, shape)
              )
      if len(found) > 1:
          raise Exception("more than one found")
      return found[0]
  
imports: import cntk
  import numpy
  from cntk.contrib import crosstalk
label_desc: Use image node_id 1 for calling a global function with example usage: find_func_param(func, name, shape, allow_not_found) and returns: found, func, None