code: def _next_shape_id(self):
          
          id_str_lst = self.xpath('//@id')
          used_ids = [int(id_str) for id_str in id_str_lst if id_str.isdigit()]
          for n in range(1, len(used_ids)+2):
              if n not in used_ids:
                  return n
docs: Return unique shape id suitable for use with a new shape element.
  
          The returned id is the next available positive integer drawing object
          id in shape tree, starting from 1 and making use of any gaps in
          numbering. In practice, the minimum id is 2 because the spTree
          element itself is always assigned id="1".