code: def output(self, output, status=None):
          
          if output:
              size = self.cli.output.get_size()
  
              margin = self.get_output_margin(status)
  
              fits = True
              buf = []
              output_via_pager = self.explicit_pager and special.is_pager_enabled()
              for i, line in enumerate(output, 1):
                  special.write_tee(line)
                  special.write_once(line)
  
                  if fits or output_via_pager:
                      # buffering
                      buf.append(line)
                      if len(line) > size.columns or i > (size.rows - margin):
                          fits = False
                          if not self.explicit_pager and special.is_pager_enabled():
                              # doesn't fit, use pager
                              output_via_pager = True
  
                          if not output_via_pager:
                              # doesn't fit, flush buffer
                              for line in buf:
                                  click.secho(line)
                              buf = []
                  else:
                      click.secho(line)
  
              if buf:
                  if output_via_pager:
                      # sadly click.echo_via_pager doesn't accept generators
                      click.echo_via_pager("\n".join(buf))
                  else:
                      for line in buf:
                          click.secho(line)
  
          if status:
              click.secho(status)
docs: Output text to stdout or a pager command.
          The status text is not outputted to pager or files.
          The message will be logged in the audit log, if enabled. The
          message will be written to the tee file, if enabled. The
          message will be written to the output file, if enabled.