code: def number_format(self):
          
          GENERAL = 'General'
  
          # defined value takes precedence
          if self._number_format is not None:
              return self._number_format
  
          # multi-level (should) always be string labels
          # zero depth means empty in which case we can't tell anyway
          if self.depth != 1:
              return GENERAL
  
          # everything except dates gets 'General'
          first_cat_label = self[0].label
          if isinstance(first_cat_label, (datetime.date, datetime.datetime)):
              return 'yyyy\-mm\-dd'
          return GENERAL
docs: Read/write. Return a string representing the number format used in
          Excel to format these category values, e.g. '0.0' or 'mm/dd/yyyy'.
          This string is only relevant when the categories are numeric or date
          type, although it returns 'General' without error when the categories
          are string labels. Assigning |None| causes the default number format
          to be used, based on the type of the category labels.