parameters: (hostname: str)
docstring: Fetch metadata from a sensor and write it to disk.
  
      Accurately reconstructing point clouds from a sensor data stream
      requires access to sensor calibration and per-run configuration
      like the operating mode and azimuth window.
  
      The client API makes it easy to read metadata and write it to disk
      for use with recorded data streams.
  
      Args:
          hostname: hostname of the sensor
docstring_summary: Fetch metadata from a sensor and write it to disk.
docstring_tokens: Fetch metadata from a sensor and write it to disk .
function: def fetch_metadata(hostname: str) -> None:
      """Fetch metadata from a sensor and write it to disk.
  
      Accurately reconstructing point clouds from a sensor data stream
      requires access to sensor calibration and per-run configuration
      like the operating mode and azimuth window.
  
      The client API makes it easy to read metadata and write it to disk
      for use with recorded data streams.
  
      Args:
          hostname: hostname of the sensor
      """
      # [doc-stag-fetch-metadata]
      with closing(client.Sensor(hostname)) as source:
          # print some useful info from
          print("Retrieved metadata:")
          print(f"  serial no:        {source.metadata.sn}")
          print(f"  firmware version: {source.metadata.fw_rev}")
          print(f"  product line:     {source.metadata.prod_line}")
          print(f"  lidar mode:       {source.metadata.mode}")
          print(f"Writing to: {hostname}.json")
  
          # write metadata to disk
          source.write_metadata(f"{hostname}.json")
function_tokens: def fetch_metadata ( hostname : str ) -> None : # [doc-stag-fetch-metadata] with closing ( client . Sensor ( hostname ) ) as source : # print some useful info from print ( "Retrieved metadata:" ) print ( f"  serial no:        {source.metadata.sn}" ) print ( f"  firmware version: {source.metadata.fw_rev}" ) print ( f"  product line:     {source.metadata.prod_line}" ) print ( f"  lidar mode:       {source.metadata.mode}" ) print ( f"Writing to: {hostname}.json" ) # write metadata to disk source . write_metadata ( f"{hostname}.json" )