code: def __create_vector(self, *vec) -> Vector3:
          
          import numbers
  
          if len(vec) == 1:
              if hasattr(vec[0], "__getitem__"):  # Support all subscriptable types.
                  try:
                      x = float(vec[0][0])
                      y = float(vec[0][1])
                      try:
                          z = float(vec[0][2])
                      except (ValueError, IndexError):
                          z = 0
                  except ValueError:
                      raise ValueError(f"Unexpected type(s) for creating vector: {type(vec[0][0])}, {type(vec[0][1])}")
                  except IndexError:
                      raise IndexError(f"Unexpected IndexError when creating vector from type: {type(vec[0])}")
              elif isinstance(vec[0], Vector3.Vector3):
                  x = vec[0].X()
                  y = vec[0].Y()
                  z = vec[0].Z()
              elif isinstance(vec[0], GameDataStructVector3):
                  x = vec[0].x
                  y = vec[0].y
                  z = vec[0].z
              else:
                  raise ValueError(f"Unexpected type for creating vector: {type(vec[0])}")
          elif len(vec) == 2 or len(vec) == 3:
              if isinstance(vec[0], numbers.Number) and isinstance(vec[1], numbers.Number):
                  x = vec[0]
                  y = vec[1]
                  if len(vec) == 2:
                      z = 0
                  else:
                      if isinstance(vec[2], numbers.Number):
                          z = vec[2]
                      else:
                          raise ValueError(f"Unexpected type for creating vector: {type(vec[0])}")
              else:
                  raise ValueError(f"Unexpected type(s) for creating vector: {type(vec[0])}, {type(vec[1])}")
          else:
              raise ValueError("Unexpected number of arguments for creating vector")
  
          return Vector3.CreateVector3(self.builder, x, y, z)
docs: Converts a variety of vector types to a flatbuffer Vector3.
          Supports Flatbuffers Vector3, cTypes Vector3, list/tuple of numbers, or passing x,y,z (z optional)