code: def construct_memory_params(json: dict):
      if json["store_type"] == "redispubsub":
          memory_params = RedisPubSubMemoryBackendParameters(
              json["redis_address"],
              json["redis_port"],
              channel=json.get("channel", ""),
              run_type=json["run_type"],
          )
          return memory_params
  
label_desc: Use image node_id 2 for calling a global function with example usage: construct_memory_params(json) and returns: memory_params