def METHOD_NAME(self):
    if self.secret_type != SecretType.SSH_KEY \
            or not self.secret \
            or not self.private_key:
        return None
    project_dir = settings.PROJECT_DIR
    tmp_dir = os.path.join(project_dir, 'tmp')
    key_name = '.' + md5(self.private_key.encode('utf-8')).hexdigest()
    key_path = os.path.join(tmp_dir, key_name)
    if not os.path.exists(key_path):
        # https://github.com/ansible/ansible-runner/issues/544
        # ssh requires OpenSSH format keys to have a full ending newline.
        # It does not require this for old-style PEM keys.
        with open(key_path, 'w') as f:
            f.write(self.secret)
            if is_openssh_format_key(self.secret.encode('utf-8')):
                f.write("\n")
        os.chmod(key_path, 0o400)
    return key_path