code: def lidar_callback(point_cloud, point_list):
      """Prepares a point cloud with intensity
      colors ready to be consumed by Open3D"""
      data = np.copy(
          np.frombuffer(point_cloud.raw_data, dtype=np.dtype("f4"))
      )
      data = np.reshape(data, (int(data.shape[0] / 4), 4))
  
      # Isolate the intensity and compute a color for it
      intensity = data[:, -1]
      intensity_col = 1.0 - np.log(intensity) / np.log(
          np.exp(-0.004 * 100)
      )
      int_color = np.c_[
          np.interp(intensity_col, VID_RANGE, VIRIDIS[:, 0]),
          np.interp(intensity_col, VID_RANGE, VIRIDIS[:, 1]),
          np.interp(intensity_col, VID_RANGE, VIRIDIS[:, 2]),
      ]
  
      # Isolate the 3D data
      points = data[:, :-1]
  
      # We're negating the y to correclty visualize a world that matches
      # what we see in Unreal since Open3D uses a right-handed coordinate system
      points[:, :1] = -points[:, :1]
  
      # # An example of converting points from sensor to vehicle space if we had
      # # a carla.Transform variable named "tran":
      # points = np.append(points, np.ones((points.shape[0], 1)), axis=1)
      # points = np.dot(tran.get_matrix(), points.T).T
      # points = points[:, :-1]
  
      point_list.points = o3d.utility.Vector3dVector(points)
      point_list.colors = o3d.utility.Vector3dVector(int_color)
  
file_path: carla/PythonAPI/examples/open3d_lidar.py
imports: import glob
  import os
  import sys
  import argparse
  import time
  from datetime import datetime
  import random
  import numpy
  from matplotlib import cm
  import open3d
  import carla
label_desc: Use image node_id 1 for calling a global function with example usage: lidar_callback(point_cloud, point_list) without return types