code: def connect(
      host="default",
      port=0,
      user=None,
      kerb_ticket=None,
      extra_conf=None,
  ):
      """
      DEPRECATED: Connect to an HDFS cluster.
  
      All parameters are optional and should only be set if the defaults need
      to be overridden.
  
      Authentication should be automatic if the HDFS cluster uses Kerberos.
      However, if a username is specified, then the ticket cache will likely
      be required.
  
      .. deprecated:: 2.0
          ``pyarrow.hdfs.connect`` is deprecated,
          please use ``pyarrow.fs.HadoopFileSystem`` instead.
  
      Parameters
      ----------
      host : NameNode. Set to "default" for fs.defaultFS from core-site.xml.
      port : NameNode's port. Set to 0 for default or logical (HA) nodes.
      user : Username when connecting to HDFS; None implies login user.
      kerb_ticket : Path to Kerberos ticket cache.
      extra_conf : dict, default None
        extra Key/Value pairs for config; Will override any
        hdfs-site.xml properties
  
      Notes
      -----
      The first time you call this method, it will take longer than usual due
      to JNI spin-up time.
  
      Returns
      -------
      filesystem : HadoopFileSystem
      """
      warnings.warn(
          _DEPR_MSG.format(
              "hdfs.connect", "2.0.0", "fs.HadoopFileSystem"
          ),
          FutureWarning,
          stacklevel=2,
      )
      return _connect(
          host=host,
          port=port,
          user=user,
          kerb_ticket=kerb_ticket,
          extra_conf=extra_conf,
      )
  
imports: import os
  import posixpath
  import sys
  import warnings
  from pyarrow.util import doc, _DEPR_MSG
  from pyarrow.filesystem import FileSystem
  import pyarrow._hdfsio
label_desc: Use image node_id 5 for calling a global function with example usage: connect(host, port, user, kerb_ticket, extra_conf) and returns: _connect