code: def ssh_compute_remove(public_key, application_name, user=None):
      
      if not (os.path.isfile(authorized_keys(application_name, user)) or
              os.path.isfile(known_hosts(application_name, user))):
          return
  
      keys = ssh_authorized_keys_lines(application_name, user=None)
      keys = [k.strip() for k in keys]
  
      if public_key not in keys:
          return
  
      [keys.remove(key) for key in keys if key == public_key]
  
      with open(authorized_keys(application_name, user), 'w') as _keys:
          keys = '\n'.join(keys)
          if not keys.endswith('\n'):
              keys += '\n'
          _keys.write(keys)
docs: Remove given public key from authorized_keys file.
  
      :param public_key: Public key.
      :type public_key: str
      :param application_name: Name of application eg nova-compute-something
      :type application_name: str
      :param user: The user that the ssh asserts are for.
      :type user: str