def _user_exists(self, username):
        try:
            pwd.getpwnam(username)[0]  # user exists
        except __HOLE__:
            return False
        home_dir = os.path.join('/home', '{0}'.format(username))
        auth_key_file = os.path.join(home_dir, '.ssh', 'authorized_keys')
        if not os.path.exists(home_dir):  # user home not exists
            return False
        if not os.path.exists(auth_key_file):  # authorized_keys not exists
            return False
        return True
dataset/ETHPy150Open koshinuke/koshinuke.py/tests/auth_test.py/AuthTestCase._user_exists