code: def _preprocess(args, depth):
      """Validate and pre-process inputs as follows:
  
      * Check that the dimension of the arguments corresponds to the depth
  
      Args:
          args (tensor_like): trainable parameters of the template
          depth (int): how often the layer is repeated
      """
  
      for arg in args:
          # some TF objects don't have len
          arg_depth = (
              len(arg) if hasattr(arg, "__len__") else shape(arg)[0]
          )
          if arg_depth != depth:
              raise ValueError(
                  f"Each positional argument must have length matching 'depth'; expected {depth} got {arg_depth}"
              )
  
label_desc: Use image node_id 1 for calling a global function with example usage: _preprocess(args, depth) without return types