class_docstr: This decorator class ensures seamless namenode failover and retry, when an HDFS call fails
  due to StandbyException, up to a maximum retry.
docstr: Attempts the function call, catching exception, re-connecting, and retrying, up to a
  pre-configured maximum number of attempts.
  
  :param obj: calling class instance, the HDFS client object
  :param args: positional arguments to func
  :param kwargs: arbitrary keyword arguments to func
  :return: return of ``func`` call; if max retries exceeded, raise a RuntimeError; or raise
          any unexpected exception
code: def __call__(self, obj, *args, **kwargs):
      """
      Attempts the function call, catching exception, re-connecting, and retrying, up to a
      pre-configured maximum number of attempts.
  
      :param obj: calling class instance, the HDFS client object
      :param args: positional arguments to func
      :param kwargs: arbitrary keyword arguments to func
      :return: return of ``func`` call; if max retries exceeded, raise a RuntimeError; or raise
              any unexpected exception
      """
      failures = []
      while len(failures) <= self.MAX_FAILOVER_ATTEMPTS:
          try:
              # Invoke the filesystem function on the connected HDFS object
              return getattr(obj._hdfs, self._func_name)(
                  *args, **kwargs
              )
          except ArrowIOError as e:
              # An HDFS IP error occurred, retry HDFS connect to failover
              obj._do_connect()
              failures.append(e)
      # Failover attempts exceeded at this point!
      raise MaxFailoversExceeded(
          failures, self.MAX_FAILOVER_ATTEMPTS, self._func_name
      )
  
imports: import functools
  import inspect
  import logging
  import os
  from distutils.version import LooseVersion
  from xml.etree import ElementTree
  import pyarrow
  import six
  from pyarrow.hdfs import HadoopFileSystem
  from pyarrow.lib import ArrowIOError
  from six.moves.urllib.parse import urlparse
label_desc: Use image node_id 3 for calling the namenode_failover obj's underlying member method code with example usage: obj.__call__(obj) and returns: getattr