Return the ``<c:cat>`` element XML for this series, as an oxml
        element.

def cat(self):
        """
        Return the ``<c:cat>`` element XML for this series, as an oxml
        element.
        """
        categories = self._series.categories

        if categories.are_numeric:
            return parse_xml(
                self._numRef_cat_tmpl.format(**{
                    'wksht_ref':     self._series.categories_ref,
                    'number_format': categories.number_format,
                    'cat_count':     categories.leaf_count,
                    'cat_pt_xml':    self._cat_num_pt_xml,
                    'nsdecls':       ' %s' % nsdecls('c'),
                })
            )

        if categories.depth == 1:
            return parse_xml(
                self._cat_tmpl.format(**{
                    'wksht_ref':  self._series.categories_ref,
                    'cat_count':  categories.leaf_count,
                    'cat_pt_xml': self._cat_pt_xml,
                    'nsdecls':    ' %s' % nsdecls('c'),
                })
            )

        return parse_xml(
            self._multiLvl_cat_tmpl.format(**{
                'wksht_ref': self._series.categories_ref,
                'cat_count': categories.leaf_count,
                'lvl_xml':   self._lvl_xml(categories),
                'nsdecls':   ' %s' % nsdecls('c'),
            })
        )