def METHOD_NAME(self):
    util.check_environ.cache_clear()
    os.environ.pop('HOME', None)
    import pwd
    # only set pw_dir field, other fields are not used
    result = pwd.struct_passwd(
        (None, None, None, None, None, '/home/distutils', None)
    )
    with mock.patch.object(pwd, 'getpwuid', return_value=result):
        check_environ()
        assert os.environ['HOME'] == '/home/distutils'
    util.check_environ.cache_clear()
    os.environ.pop('HOME', None)
    # bpo-10496: Catch pwd.getpwuid() error
    with mock.patch.object(pwd, 'getpwuid', side_effect=KeyError):
        check_environ()
        assert 'HOME' not in os.environ