code: def test_pivot(self):
      table = Table(self.rows, self.column_names, self.column_types)
  
      pivot_table = table.pivot("race", "gender")
  
      pivot_rows = (
          ("white", 1, 2),
          ("black", 1, 0),
          ("latino", 1, 0),
          ("asian", 0, 1),
      )
  
      self.assertColumnNames(pivot_table, ["race", "male", "female"])
      self.assertRowNames(
          pivot_table, ["white", "black", "latino", "asian"]
      )
      self.assertColumnTypes(pivot_table, [Text, Number, Number])
      self.assertRows(pivot_table, pivot_rows)
  
imports: import sys
  from decimal import Decimal
  from agate import Table
  from agate.aggregations import Sum
  from agate.computations import Percent
  from agate.data_types import Number, Text
  from agate.testcase import AgateTestCase
label_desc: Use image node_id 2 for calling the TestPivot obj's underlying member method code with example usage: obj.test_pivot() without return types