code: def _get_help_record(opt):
      
  
      def _write_opts(opts):
          rv, _ = click.formatting.join_options(opts)
          if not opt.is_flag and not opt.count:
              rv += ' <{}>'.format(opt.name)
          return rv
  
      rv = [_write_opts(opt.opts)]
      if opt.secondary_opts:
          rv.append(_write_opts(opt.secondary_opts))
  
      help = opt.help or ''
      extra = []
      if opt.default is not None and opt.show_default:
          extra.append(
              'default: %s' % (', '.join('%s' % d for d in opt.default)
                               if isinstance(opt.default,
                                             (list, tuple)) else opt.default, ))
      if opt.required:
          extra.append('required')
      if extra:
          help = '%s[%s]' % (help and help + '  ' or '', '; '.join(extra))
  
      return ', '.join(rv), help
docs: Re-implementation of click.Opt.get_help_record.
  
      The variant of 'get_help_record' found in Click makes uses of slashes to
      separate multiple opts, and formats option arguments using upper case. This
      is not compatible with Sphinx's 'option' directive, which expects
      comma-separated opts and option arguments surrounded by angle brackets [1].
  
      [1] http://www.sphinx-doc.org/en/stable/domains.html#directive-option