human
Complete the below
def jt_ha(funct):

    ''''Support JT plugin HA by trying other MR cluster.
    This modifies the cached JT and so will happen just once by failover.'
    '''

What is a the Python program you requested?
assistant
#Here is the Python program you requested.
    def decorate(api, *args, **kwargs):
        try:
            return funct(api, *args, **kwargs)
        except Exception as ex:
            if ('Could    not    connect    to' in str(ex)):
                LOG.info(('JobTracker    not    available,    trying    JT    plugin    HA:    %s.' % ex))
                jt_ha = get_next_ha_mrcluster()
                if (jt_ha is not None):
                    if (jt_ha[1].host == api.jt.host):
                        raise ex
                    (config, api.jt) = jt_ha
                    return funct(api, *args, **kwargs)
            raise ex
    return wraps(funct)(decorate)