def METHOD_NAME(self):
    """
    Method to correctly set the environment for MPICH and derivatives
    """
    env_vars = ['CFLAGS', 'CPPFLAGS', 'CXXFLAGS', 'FCFLAGS', 'FFLAGS', 'LDFLAGS', 'LIBS']
    vars_to_unset = ['F90', 'F90FLAGS']
    for envvar in env_vars:
        envvar_val = os.getenv(envvar)
        if envvar_val:
            new_envvar = 'MPICHLIB_%s' % envvar
            new_envvar_val = os.getenv(new_envvar)
            vars_to_unset.append(envvar)
            if envvar_val == new_envvar_val:
                self.log.debug("$%s == $%s, just defined $%s as empty", envvar, new_envvar, envvar)
            elif new_envvar_val is None:
                env.setvar(new_envvar, envvar_val)
            else:
                raise EasyBuildError("Both $%s and $%s set, can I overwrite $%s with $%s (%s) ?",
                                     envvar, new_envvar, new_envvar, envvar, envvar_val)
    env.unset_env_vars(vars_to_unset)