code: def record_state(serv_name, state, conn=None):
      
      serv_filter = {SERVICE_KEY:serv_name}
      updated = {PLUGIN_STATE_KEY: state}
      return RPC.filter(serv_filter).update(updated).run(conn)
docs: MAKE A DOCSTRING
      :param serv_name: <str> service name of plugin instance
      :param state: <dictionary> plugin state
      :param conn: <rethinkdb.DefaultConnection>
      :return: