code: def batch_scenario(self, batch_tick, after_tick):
      bp_veh = self.world.get_blueprint_library().filter("vehicle.*")[0]
      veh_transf = self.world.get_map().get_spawn_points()[0]
  
      frame_init = self.world.get_snapshot().frame
  
      batch = [carla.command.SpawnActor(bp_veh, veh_transf)]
  
      responses = self.client.apply_batch_sync(batch, batch_tick)
      if after_tick:
          self.world.tick()
  
      if len(responses) != 1 or responses[0].error:
          self.fail(
              "%s: The test car could not be correctly spawned"
              % (bp_veh.id)
          )
  
      vehicle_id = responses[0].actor_id
  
      frame_after = self.world.get_snapshot().frame
  
      self.client.apply_batch_sync(
          [carla.command.DestroyActor(vehicle_id)]
      )
  
      return frame_init, frame_after
  
file_path: carla/PythonAPI/test/smoke/test_sync.py
imports: from .None import SyncSmokeTest
  import carla
  import time
label_desc: Use image node_id 4 for calling the TestSynchronousMode obj's underlying member method code with example usage: obj.batch_scenario(batch_tick, after_tick) and returns: frame_init,  frame_after