def _use_inf_as_na(key):
from pandas._config import get_option<EOL>flag = get_option(key)<EOL>if flag:<EOL><INDENT>globals()['<STR_LIT>'] = _isna_old<EOL><DEDENT>else:<EOL><INDENT>globals()['<STR_LIT>'] = _isna_new<EOL><DEDENT>
Option change callback for na/inf behaviour
    Choose which replacement for numpy.isnan / -numpy.isfinite is used.

    Parameters
    ----------
    flag: bool
        True means treat None, NaN, INF, -INF as null (old way),
        False means None and NaN are null, but INF, -INF are not null
        (new way).

    Notes
    -----
    This approach to setting global module values is discussed and
    approved here:

    * http://stackoverflow.com/questions/4859217/
      programmatically-creating-variables-in-python/4859312#4859312