code: def create_instances(cls, name, atts, capacity):
          
          attributes = []
          for att in atts:
              attributes.append(att.jobject)
          return Instances(
              javabridge.make_instance(
                  "weka/core/Instances", "(Ljava/lang/String;Ljava/util/ArrayList;I)V",
                  name, javabridge.make_list(attributes), capacity))
docs: Creates a new Instances.
  
          :param name: the relation name
          :type name: str
          :param atts: the list of attributes to use for the dataset
          :type atts: list of Attribute
          :param capacity: how many data rows to reserve initially (see compactify)
          :type capacity: int
          :return: the dataset
          :rtype: Instances