code: def compute_metavar(kwargs):
      
      metavar = kwargs.get('metavar')
      if not metavar:
        typ = kwargs.get('type', str)
        if typ == list:
          typ = kwargs.get('member_type', str)
  
        if typ == dict:
          metavar = '"{\'key1\':val1,\'key2\':val2,...}"'
        else:
          type_name = typ.__name__ if typ != newstr else 'str'  # TODO(#6071): drop special case once Py2 removed
          metavar = '<{}>'.format(type_name)
  
      return metavar
docs: Compute the metavar to display in help for an option registered with these kwargs.