code: def get_ephemeral_range():
      if platform.system() == "Linux":
          filename = "/proc/sys/net/ipv4/ip_local_port_range"
          if os.path.exists(filename):
              with open(filename) as afile:
                  data = afile.read(1024)  # fix for musl
              port_range = tuple(map(int, data.strip().split()))
              if len(port_range) == 2:
                  return port_range
              else:
                  logger.warning(
                      "Bad ip_local_port_range format: '%s'. Going to use IANA suggestion",
                      data,
                  )
      elif platform.system() == "Darwin":
          first = _sysctlbyname_uint("net.inet.ip.portrange.first")
          last = _sysctlbyname_uint("net.inet.ip.portrange.last")
          if first and last:
              return first, last
      # IANA suggestion
      return (1 << 15) + (1 << 14), UI16MAXVAL
  
imports: import os
  import errno
  import socket
  import random
  import logging
  import platform
  import threading
  import six
label_desc: Use image node_id 2 for calling a global function with example usage: get_ephemeral_range() and returns: unknown,  UI16MAXVAL, port_range, first,  last