def get_ssh_key_pair():
    """Create a cstar_docker specific SSH key, or return the previously generated one"""
    key_path = os.path.join(os.path.expanduser("~"), ".cstar_perf","cstar_docker_key")
    pub_key_path = key_path + '.pub'
    if not (os.path.exists(key_path) and os.path.exists(pub_key_path)):
        try:
            os.mkdir(os.path.join(os.path.expanduser("~"), ".cstar_perf"))
        except __HOLE__:
            pass
        key = paramiko.rsakey.RSAKey.generate(2048)
        with open(key_path, 'w') as f:
            key.write_private_key(f)
        with open(pub_key_path, 'w') as f:
            f.write("ssh-rsa ")
            f.write(key.get_base64())
            f.write(" cstar_docker generated {}".format(time.ctime()))
            f.write("\n")
        os.chmod(key_path, 0600)
        os.chmod(pub_key_path, 0600)
    return (key_path, pub_key_path)
dataset/ETHPy150Open datastax/cstar_perf/tool/cstar_perf/docker/cstar_docker.py/get_ssh_key_pair