parameters: (hostname: str)
docstring: Configure sensor to use dual returns profile given hostname
  
      Args:
          hostname: hostname of the sensor
docstring_summary: Configure sensor to use dual returns profile given hostname
docstring_tokens: Configure sensor to use dual returns profile given hostname
function: def configure_dual_returns(hostname: str) -> None:
      """Configure sensor to use dual returns profile given hostname
  
      Args:
          hostname: hostname of the sensor
      """
      config = client.get_config(hostname)
      if (config.lidar_mode == client.LidarMode.MODE_2048x10) or (config.lidar_mode
              == client.LidarMode.MODE_1024x20):
          print(f"Changing lidar_mode from {str(config.lidar_mode)} to 1024x10 to"
                "  enable to dual returns. Will not persist change.")
          config.lidar_mode = client.LidarMode.MODE_1024x10
  
      # [doc-stag-config-udp-profile]
      config.udp_profile_lidar = client.UDPProfileLidar.PROFILE_LIDAR_RNG19_RFL8_SIG16_NIR16_DUAL
      # [doc-etag-config-udp-profile]
  
      try:
          client.set_config(hostname, config, persist=False, udp_dest_auto=False)
      except ValueError:
          print("error: Your sensor does not support dual returns. Please"
                " check the hardware revision and firmware version vs release"
                " notes.")
          return
  
      print("Retrieving sensor metadata..")
      with closing(client.Sensor(hostname)) as source:
          # print some useful info from
          print(f"udp profile lidar: {str(source.metadata.format.udp_profile_lidar)}")
function_tokens: def configure_dual_returns ( hostname : str ) -> None : config = client . get_config ( hostname ) if ( config . lidar_mode == client . LidarMode . MODE_2048x10 ) or ( config . lidar_mode == client . LidarMode . MODE_1024x20 ) : print ( f"Changing lidar_mode from {str(config.lidar_mode)} to 1024x10 to" "  enable to dual returns. Will not persist change." ) config . lidar_mode = client . LidarMode . MODE_1024x10 # [doc-stag-config-udp-profile] config . udp_profile_lidar = client . UDPProfileLidar . PROFILE_LIDAR_RNG19_RFL8_SIG16_NIR16_DUAL # [doc-etag-config-udp-profile] try : client . set_config ( hostname , config , persist = False , udp_dest_auto = False ) except ValueError : print ( "error: Your sensor does not support dual returns. Please" " check the hardware revision and firmware version vs release" " notes." ) return print ( "Retrieving sensor metadata.." ) with closing ( client . Sensor ( hostname ) ) as source : # print some useful info from print ( f"udp profile lidar: {str(source.metadata.format.udp_profile_lidar)}" )