code: def test_oldhadoop(self):
      basepath = self.tempdir.name
      dict_data = [(1, {}), (1, {"row1": 1.0}), (2, {"row2": 2.0})]
      self.sc.parallelize(dict_data).saveAsHadoopFile(
          basepath + "/oldhadoop/",
          "org.apache.hadoop.mapred.SequenceFileOutputFormat",
          "org.apache.hadoop.io.IntWritable",
          "org.apache.hadoop.io.MapWritable",
      )
      result = self.sc.hadoopFile(
          basepath + "/oldhadoop/",
          "org.apache.hadoop.mapred.SequenceFileInputFormat",
          "org.apache.hadoop.io.IntWritable",
          "org.apache.hadoop.io.MapWritable",
      ).collect()
      for v in result:
          self.assertTrue(v, dict_data)
  
      conf = {
          "mapred.output.format.class": "org.apache.hadoop.mapred.SequenceFileOutputFormat",
          "mapreduce.job.output.key.class": "org.apache.hadoop.io.IntWritable",
          "mapreduce.job.output.value.class": "org.apache.hadoop.io.MapWritable",
          "mapreduce.output.fileoutputformat.outputdir": basepath
          + "/olddataset/",
      }
      self.sc.parallelize(dict_data).saveAsHadoopDataset(conf)
      input_conf = {
          "mapreduce.input.fileinputformat.inputdir": basepath
          + "/olddataset/"
      }
      result = self.sc.hadoopRDD(
          "org.apache.hadoop.mapred.SequenceFileInputFormat",
          "org.apache.hadoop.io.IntWritable",
          "org.apache.hadoop.io.MapWritable",
          conf=input_conf,
      ).collect()
      for v in result:
          self.assertTrue(v, dict_data)
  
imports: import os
  import shutil
  import tempfile
  import unittest
  from pyspark.testing.utils import ReusedPySparkTestCase, SPARK_HOME
label_desc: Use image node_id 3 for calling the OutputFormatTests obj's underlying member method code with example usage: obj.test_oldhadoop() without return types