code: def _create_vector_types():
      _mapping = [
          (k, globals()[k])
          for k in [
              "char",
              "uchar",
              "short",
              "ushort",
              "int",
              "uint",
              "long",
              "ulong",
              "float",
              "double",
          ]
      ]
  
      def set_global(key, val):
          globals()[key] = val
  
      vec_types = {}
      vec_type_to_scalar_and_count = {}
  
      field_names = ["x", "y", "z", "w"]
  
      counts = [2, 3, 4, 8, 16]
  
      for base_name, base_type in _mapping:
          for count in counts:
              name = "%s%d" % (base_name, count)
  
              titles = field_names[:count]
  
              padded_count = count
              if count == 3:
                  padded_count = 4
  
              names = ["s%d" % i for i in range(count)]
              while len(names) < padded_count:
                  names.append("padding%d" % (len(names) - count))
  
              if len(titles) < len(names):
                  titles.extend((len(names) - len(titles)) * [None])
  
              try:
                  dtype = np.dtype(
                      {
                          "names": names,
                          "formats": [base_type] * padded_count,
                          "titles": titles,
                      }
                  )
              except NotImplementedError:
                  try:
                      dtype = np.dtype(
                          [
                              ((n, title), base_type)
                              for (n, title) in zip(names, titles)
                          ]
                      )
                  except TypeError:
                      dtype = np.dtype(
                          [
                              (n, base_type)
                              for (n, title) in zip(names, titles)
                          ]
                      )
  
              get_or_register_dtype(name, dtype)
  
              set_global(name, dtype)
  
              def create_array(
                  dtype, count, padded_count, *args, **kwargs
              ):
                  if len(args) < count:
                      from warnings import warn
  
                      warn(
                          "default values for make_xxx are deprecated;"
                          " instead specify all parameters or use"
                          " cltypes.zeros_xxx",
                          DeprecationWarning,
                          stacklevel=4,
                      )
  
                  padded_args = tuple(
                      list(args) + [0] * (padded_count - len(args))
                  )
                  array = eval(
                      "array(padded_args, dtype=dtype)",
                      {
                          "array": np.array,
                          "padded_args": padded_args,
                          "dtype": dtype,
                      },
                  )
                  for key, val in list(kwargs.items()):
                      array[key] = val
                  return array
  
              set_global(
                  "make_" + name,
                  eval(
                      "lambda *args, **kwargs: create_array(dtype, %i, %i, "
                      "*args, **kwargs)" % (count, padded_count),
                      {"create_array": create_array, "dtype": dtype},
                  ),
              )
              set_global(
                  "filled_" + name,
                  eval(
                      "lambda val: make_%s(*[val]*%i)" % (name, count)
                  ),
              )
              set_global(
                  "zeros_" + name, eval("lambda: filled_%s(0)" % (name))
              )
              set_global(
                  "ones_" + name, eval("lambda: filled_%s(1)" % (name))
              )
  
              vec_types[np.dtype(base_type), count] = dtype
              vec_type_to_scalar_and_count[dtype] = (
                  np.dtype(base_type),
                  count,
              )
  
      return vec_types, vec_type_to_scalar_and_count
  
label_desc: Use image node_id 1 for calling a global function with example usage: _create_vector_types() and returns: vec_types,  vec_type_to_scalar_and_count, array