code: def authorized_keys(mode='r'):
      
      path = '/var/home/.ssh/authorized_keys'
      if not os.path.exists(path):
          os.makedirs(os.path.dirname(path))
          open(path, 'w').close()
      with open(path, mode) as ak:
          yield ak
docs: Open the authorized_keys file. Separate function for mocking.
  
      :param mode: As :py:meth:`open`