code: def create_instance(cls, values, classname="weka.core.DenseInstance", weight=1.0):
          
          jni_classname = classname.replace(".", "/")
          if type(values) is list:
              for i in range(len(values)):
                  values[i] = float(values[i])
              values = numpy.array(values)
          return Instance(
              javabridge.make_instance(
                  jni_classname, "(D[D)V",
                  weight, javabridge.get_env().make_double_array(values)))
docs: Creates a new instance.
  
          :param values: the float values (internal format) to use, numpy array or list.
          :type values: ndarray or list
          :param classname: the classname of the instance (eg weka.core.DenseInstance).
          :type classname: str
          :param weight: the weight of the instance
          :type weight: float