code: def anchor_idx(self):
          
          anchor = self.anchor
          if anchor in ["top", "bottom"]:
              return anchor
          return self.valid_elements.get_by_id(anchor).index_in_valids
docs: int or str representing index of anchor element in dimension.
  
          When the anchor is an operation, like 'top' or 'bottom'