<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_instances(cls, name, atts, capacity):
 """ 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 """

        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))