code: def register_id(self, id_string):
          
          try:
              prefix, count = id_string.rsplit("_", 1)
              count = int(count)
          except ValueError:
              # We don't need to worry about ids that don't match our pattern
              pass
          else:
              if prefix == self.prefix:
                  self.counter = max(count, self.counter)
docs: Register a manually assigned id as used, to avoid collisions.