code: def _make_flight_info(self, key, descriptor, table):
      if self.tls_certificates:
          location = pyarrow.flight.Location.for_grpc_tls(
              self.host, self.port
          )
      else:
          location = pyarrow.flight.Location.for_grpc_tcp(
              self.host, self.port
          )
      endpoints = [
          pyarrow.flight.FlightEndpoint(repr(key), [location]),
      ]
  
      mock_sink = pyarrow.MockOutputStream()
      stream_writer = pyarrow.RecordBatchStreamWriter(
          mock_sink, table.schema
      )
      stream_writer.write_table(table)
      stream_writer.close()
      data_size = mock_sink.size()
  
      return pyarrow.flight.FlightInfo(
          table.schema, descriptor, endpoints, table.num_rows, data_size
      )
  
imports: import ast
  import logging
  import threading
  import time
  import uuid
  import pyarrow
  import pyarrow.flight
label_desc: Use image node_id 3 for calling the FlightServer obj's underlying member method code with example usage: obj._make_flight_info(key, descriptor, table) and returns: pyarrow