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:
                      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():
                              output_via_pager = True
                          if not output_via_pager:
                              for line in buf:
                                  click.secho(line)
                              buf = []
                  else:
                      click.secho(line)
              if buf:
                  if output_via_pager:
                      click.echo_via_pager("\n".join(buf))
                  else:
                      for line in buf:
                          click.secho(line)
          if status:
              click.secho(status)