code: def _duplicate_example(self, request):
      
      index = int(request.args.get('index'))
      if index >= len(self.examples):
        return http_util.Respond(request, {'error': 'invalid index provided'},
                                 'application/json', code=400)
      new_example = self.example_class()
      new_example.CopyFrom(self.examples[index])
      self.examples.append(new_example)
      self.updated_example_indices.add(len(self.examples) - 1)
      self.generate_sprite([ex.SerializeToString() for ex in self.examples])
      return http_util.Respond(request, {}, 'application/json')
docs: Duplicates the specified example.
  
      Args:
        request: A request that should contain 'index'.
  
      Returns:
        An empty response.