code: def out(self, obj, formatter=None, out_file=None):  # pylint: disable=no-self-use
          
          if not isinstance(obj, CommandResultItem):
              raise TypeError('Expected {} got {}'.format(CommandResultItem.__name__, type(obj)))
  
          import platform
          import colorama
  
          if platform.system() == 'Windows':
              out_file = colorama.AnsiToWin32(out_file).stream
          output = formatter(obj)
          try:
              print(output, file=out_file, end='')
          except IOError as ex:
              if ex.errno == errno.EPIPE:
                  pass
              else:
                  raise
          except UnicodeEncodeError:
              print(output.encode('ascii', 'ignore').decode('utf-8', 'ignore'),
                    file=out_file, end='')
docs: Produces the output using the command result.
              The method does not return a result as the output is written straight to the output file.
  
          :param obj: The command result
          :type obj: knack.util.CommandResultItem
          :param formatter: The formatter we should use for the command result
          :type formatter: function
          :param out_file: The file to write output to
          :type out_file: file-like object