class_docstr: Test equality and ordering comparisons for built-in types and
  user-defined classes that implement relevant combinations of rich
  comparison methods.
class_docstr_tok: ["Test","equality","and","ordering","comparisons","for","built-in","types","and","user-defined","classes","that","implement","relevant","combinations","of","rich","comparison","methods","."]
docstr: Create objects of type `class_` and return them in a list.
  
  `values` is a list of values that determines the value of data
  attribute `x` of each object.
  
  Objects in the returned list are sorted by their identity.  They
  assigned values in `values` list order.  By assign decreasing
  values to objects with increasing identities, testcases can assert
  that order comparison is performed by value and not by identity.
docstr_tok: ["Create","objects","of","type","`","class_","`","and","return","them","in","a","list",".","`","values","`","is","a","list","of","values","that","determines","the","value","of","data","attribute","`","x","`","of","each","object",".","Objects","in","the","returned","list","are","sorted","by","their","identity",".","They","assigned","values","in","`","values","`","list","order",".","By","assign","decreasing","values","to","objects","with","increasing","identities",",","testcases","can","assert","that","order","comparison","is","performed","by","value","and","not","by","identity","."]
code: def create_sorted_instances(self, class_, values):
      """Create objects of type `class_` and return them in a list.
  
      `values` is a list of values that determines the value of data
      attribute `x` of each object.
  
      Objects in the returned list are sorted by their identity.  They
      assigned values in `values` list order.  By assign decreasing
      values to objects with increasing identities, testcases can assert
      that order comparison is performed by value and not by identity.
      """
  
      instances = [class_() for __ in range(len(values))]
      instances.sort(key=id)
      # Assign the provided values to the instances.
      for inst, value in zip(instances, values):
          inst.x = value
      return instances
  
imports: import unittest
  from test.support import ALWAYS_EQ
  from fractions import Fraction
  from decimal import Decimal
label_desc: Use image node_id 1 for calling the ComparisonFullTest obj's underlying member method code with example usage: obj.create_sorted_instances(class_, values) and returns: instances