docstr: Benchmark each `to_format` method for two-sided contexts.
docstr_tok: ["Benchmark","each","`","to_format","`","method","for","two-sided","contexts","."]
code: def benchmark_to_format_two(self):
      """Benchmark each `to_format` method for two-sided contexts."""
      for name in (
          "arrow",
          "csv",
          "columns",
          "records",
      ):
          for i in range(len(PerspectiveBenchmark.group_by_OPTIONS)):
              RP = PerspectiveBenchmark.group_by_OPTIONS[i]
              CP = PerspectiveBenchmark.split_by_OPTIONS[i]
              if len(RP) == 0 and len(CP) == 0:
                  continue
              test_meta = make_meta(
                  "to_format",
                  "to_{0}_r{1}_c{2}".format(name, len(RP), len(CP)),
              )
              view = self._table.view(group_by=RP, split_by=CP)
              method = "to_{0}".format(name)
              func = Benchmark(getattr(view, method), meta=test_meta)
              setattr(
                  self, "to_format_{0}".format(test_meta["name"]), func
              )
  
imports: import os
  from functools import partial
  from bench import Benchmark, Suite, Runner
  from perspective import Table
  import perspective
  import logging
label_desc: Use image node_id 14 for calling the PerspectiveBenchmark obj's underlying member method code with example usage: obj.benchmark_to_format_two() without return types