code: def unique_name(self, name):
          
          result = name
  
          if self.parent is not None:
              index = self.index
              bname = re.sub(r'-[0-9]+$', '', name)
              names = []
              for idx, actor in enumerate(self.parent.actors):
                  if idx != index:
                      names.append(actor.name)
              result = bname
              count = 0
              while result in names:
                  count += 1
                  result = bname + "-" + str(count)
  
          return result
docs: Generates a unique name.
  
          :param name: the name to check
          :type name: str
          :return: the unique name
          :rtype: str