code: def add_copies(self, node, parent, elem, minel):
          
          rep = 0 if minel is None else int(minel.arg) - 1
          for i in range(rep):
              parent.append(copy.deepcopy(elem))
docs: Add appropriate number of `elem` copies to `parent`.