code: def anchor(self):
          
          anchor = self._subtotal_dict["anchor"]
          try:
              anchor = int(anchor)
              if anchor not in self.valid_elements.element_ids:
                  return "bottom"
              return anchor
          except (TypeError, ValueError):
              return anchor.lower()
docs: int or str indicating element under which to insert this subtotal.
  
          An int anchor is the id of the dimension element (category or
          subvariable) under which to place this subtotal. The return value can
          also be one of 'top' or 'bottom'.
  
          The return value defaults to 'bottom' for an anchor referring to an
          element that is no longer present in the dimension or an element that
          represents missing data.