code: def serve_customer(epoch) -> Tuple[str, float]:
      if epoch % 100 == 0:
          print(epoch)
  
      # 10% chance to be rib lover
      rib_lover = random.random() <= 0.1
  
      result = post(
          "http://localhost:3000/api/request",
          {
              "plan_name": plan_name,
              "context_features": {0: float(rib_lover), 1: 1.0},
              "actions": {"names": ["Bacon", "Ribs"]},
          },
      )
      action_taken = result["actions"][0]["name"]
      if action_taken == "Bacon":
          # 50% chance of click
          reward = 1.0 if random.random() <= 0.5 else 0.0
      elif action_taken == "Ribs":
          if rib_lover:
              # Rib lover: 90% chance of click
              reward = 1.0 if random.random() <= 0.9 else 0.0
          else:
              # Not a rib lover, 10% chance of click
              reward = 1.0 if random.random() <= 0.1 else 0.0
  
      action_feedback = {
          "name": action_taken,
          "metrics": {"reward": reward},
      }
      post(
          "http://localhost:3000/api/feedback",
          {
              "request_id": result["request_id"],
              "plan_name": plan_name,
              "actions": [action_feedback],
          },
      )
  
      return action_taken, reward
  
file_path: ReAgent/serving/examples/ecommerce/customer_simulator.py
imports: import json
  import random
  import sys
  import time
  import urllib.error
  import urllib.request
  from multiprocessing import Pool
  from typing import Any, Dict, List, Optional, Tuple
label_desc: Use image node_id 2 for calling a global function with example usage: serve_customer(epoch) and returns: action_taken,  reward