class_docstr: Context manager to synchronize output from different sensors. Synchronous
  mode is enabled as long as we are inside this context
  
      with CARLASyncContext(world, sensors) as sync_mode:
          while True:
              data = sync_mode.tick(timeout=1.0)
  
  This code is based on https://github.com/carla-simulator/carla/blob/master/PythonAPI/examples/synchronous_mode.py
class_docstr_tok: ["Context","manager","to","synchronize","output","from","different","sensors",".","Synchronous","mode","is","enabled","as","long","as","we","are","inside","this","context","with","CARLASyncContext","(","world",",","sensors",")","as","sync_mode",":","while","True",":","data","=","sync_mode.tick","(","timeout=1.0",")","This","code","is","based","on","https",":","\/\/github.com\/carla-simulator\/carla\/blob\/master\/PythonAPI\/examples\/synchronous_mode.py"]
docstr: Retrieves data for detector, the call is non-blocking thus doesn't wait for available data.
docstr_tok: ["Retrieves","data","for","detector",",","the","call","is","non-blocking","thus","does","n't","wait","for","available","data","."]
code: def _get_detector_data(sensor_queue: queue.Queue):
      """Retrieves data for detector, the call is non-blocking thus doesn't wait for available data."""
      data = []
  
      while not sensor_queue.empty():
          data.append(sensor_queue.get_nowait())
  
      return data
  
file_path: tensorforce/tensorforce/environments/carla/synchronous_mode.py
imports: import carla
  import queue
label_desc: Use image node_id 6 for calling the CARLASyncContext obj's underlying member method code with example usage: obj._get_detector_data(sensor_queue) and returns: data