code: def test_print_items(self):
      # Test without download in print_format="table"
      header_list = ["foo", "bar"]
      item_dict_list = [
          {"foo": "yo", "bar": "hello"},
          {"foo": "cool", "bat": "there"},
      ]
      result = self.cli.print_items(
          header_list=header_list, item_dict_list=item_dict_list
      )
      assert "foo" in result
      assert "bar" in result
      assert "yo" in result
      assert "hello" in result
      assert "cool" in result
      assert "there" not in result
      assert "N/A" in result
      # Test without download in print_format="csv"
      result = self.cli.print_items(
          header_list=header_list,
          item_dict_list=item_dict_list,
          print_format="csv",
      )
      assert result == "foo,bar%syo,hello%scool,N/A%s" % (
          os.linesep,
          os.linesep,
          os.linesep,
      )
      assert "there" not in result
      # Test without download in random print_format
      result = self.cli.print_items(
          header_list=header_list,
          item_dict_list=item_dict_list,
          print_format="not_valid",
      )
      assert not result
      # Test with output_path given (not absolute)
      test_path = "testprint"
      test_full_path = os.path.join(os.getcwd(), test_path)
      result = self.cli.print_items(
          header_list=header_list,
          item_dict_list=item_dict_list,
          output_path=test_path,
      )
      assert result
      assert os.path.isfile(test_full_path)
      assert result in open(test_full_path, "r").read()
      os.remove(test_full_path)
      # Test with output_path given (absolute)
      test_full_path = os.path.join(self.temp_dir, "testprint")
      result = self.cli.print_items(
          header_list=header_list,
          item_dict_list=item_dict_list,
          output_path=test_full_path,
      )
      assert result
      assert os.path.isfile(test_full_path)
      assert result in open(test_full_path, "r").read()
  
imports: from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from future import standard_library
  from builtins import input
  import os
  import sys
  import pytest
  import tempfile
  import platform
  from datmo.cli.driver.helper import Helper
  from datmo.core.util.exceptions import ArgumentError
  from datmo.cli.command.project import ProjectCommand
  from datmo.cli.command.snapshot import SnapshotCommand
  from datmo.cli.command.environment import EnvironmentCommand
label_desc: Use image node_id 6 for calling the TestHelper obj's underlying member method code with example usage: obj.test_print_items() without return types