code: def _FormatSocketExToken(self, token_data):
      
      if token_data.socket_domain == 10:
        local_ip_address = self._FormatPackedIPv6Address(
            token_data.local_ip_address)
        remote_ip_address = self._FormatPackedIPv6Address(
            token_data.remote_ip_address)
      else:
        local_ip_address = self._FormatPackedIPv4Address(
            token_data.local_ip_address)
        remote_ip_address = self._FormatPackedIPv4Address(
            token_data.remote_ip_address)
  
      return {
          'from': local_ip_address,
          'from_port': token_data.local_port,
          'to': remote_ip_address,
          'to_port': token_data.remote_port}
docs: Formats an extended socket token as a dictionary of values.
  
      Args:
        token_data (bsm_token_data_socket_ex): AUT_SOCKET_EX token data.
  
      Returns:
        dict[str, str]: token values.