code: def generate_snapshot(self, filename='snapshot.zip'):
          
          try:
              self.make_request(
                  EngineCommandFailed,
                  resource='generate_snapshot',
                  filename=filename)
  
          except IOError as e:
              raise EngineCommandFailed(
                  'Generate snapshot failed: {}'.format(e))
docs: Generate and retrieve a policy snapshot from the engine
          This is blocking as file is downloaded
  
          :param str filename: name of file to save file to, including directory
              path
          :raises EngineCommandFailed: snapshot failed, possibly invalid filename
              specified
          :return: None