parameters: (options)
return_statement: return sessionOptions
docstring: Creates SessionOptions from the following command line arguments:
      - connections where servers, TLS and ZFP over Leased lines are specified.
      - TLS options
      - authorization options that are used as session identity options.
docstring_summary: Creates SessionOptions from the following command line arguments:
      - connections where servers, TLS and ZFP over Leased lines are specified.
      - TLS options
      - authorization options that are used as session identity options.
docstring_tokens: Creates SessionOptions from the following command line arguments : - connections where servers TLS and ZFP over Leased lines are specified . - TLS options - authorization options that are used as session identity options .
function: def createSessionOptions(options):
      """
      Creates SessionOptions from the following command line arguments:
      - connections where servers, TLS and ZFP over Leased lines are specified.
      - TLS options
      - authorization options that are used as session identity options.
      """
  
      tlsOptions = _getTlsOptions(options)
      if options.remote:
          if tlsOptions is None:
              raise RuntimeError("ZFP connections require TLS parameters")
  
          print("Creating a ZFP connection for leased lines.")
          sessionOptions = blpapi.ZfpUtil.getZfpOptionsForLeasedLines(
              options.remote,
              tlsOptions)
      else:
          sessionOptions = blpapi.SessionOptions()
          for idx, host in enumerate(options.hosts):
              sessionOptions.setServerAddress(host[0], host[1], idx)
  
          if tlsOptions:
              sessionOptions.setTlsOptions(tlsOptions)
  
      sessionOptions.setSessionIdentityOptions(
          options.sessionIdentityAuthOptions)
      print(f"Connecting to "
            f"{', '.join([h[0] + ':' + str(h[1]) for h in sessionOptions.serverAddresses()])}")
  
      return sessionOptions
function_tokens: def createSessionOptions ( options ) : tlsOptions = _getTlsOptions ( options ) if options . remote : if tlsOptions is None : raise RuntimeError ( "ZFP connections require TLS parameters" ) print ( "Creating a ZFP connection for leased lines." ) sessionOptions = blpapi . ZfpUtil . getZfpOptionsForLeasedLines ( options . remote , tlsOptions ) else : sessionOptions = blpapi . SessionOptions ( ) for idx , host in enumerate ( options . hosts ) : sessionOptions . setServerAddress ( host [ 0 ] , host [ 1 ] , idx ) if tlsOptions : sessionOptions . setTlsOptions ( tlsOptions ) sessionOptions . setSessionIdentityOptions ( options . sessionIdentityAuthOptions ) print ( f"Connecting to " f"{', '.join([h[0] + ':' + str(h[1]) for h in sessionOptions.serverAddresses()])}" ) return sessionOptions