def connect_to_either_namenode(cls, list_of_namenodes, user=None):
        """
        Returns a wrapper HadoopFileSystem "high-availability client" object that enables
        name node failover.

        Raises a HdfsConnectError if no successful connection can be established.

        :param list_of_namenodes: a required list of name node URLs to connect to.
        :param user: String denoting username when connecting to HDFS. None implies login user.
        :return: the wrapped HDFS connection object
        """
        assert list_of_namenodes is not None, "Must supply a list of namenodes"
        return HAHdfsClient(cls, list_of_namenodes, user=user)

        Returns a wrapper HadoopFileSystem "high-availability client" object that enables
        name node failover.

        Raises a HdfsConnectError if no successful connection can be established.

        :param list_of_namenodes: a required list of name node URLs to connect to.
        :param user: String denoting username when connecting to HDFS. None implies login user.
        :return: the wrapped HDFS connection object
        
petastorm/hdfs/namenode.py