code: def get_record_path(base_dir: str, prefix="ep", pattern="-"):
      dirs = sorted(os.listdir(base_dir))
      count = 0
  
      if len(dirs) > 0:
          count = 1 + int(dirs[-1].split(pattern)[1])
  
      record_path = os.path.join(base_dir, f"{prefix}{pattern}{count}")
      os.mkdir(record_path)
  
      return record_path
  
imports: import os
  import cv2
  import math
  import random
  import numpy
  import carla
  import pygame
  import threading
  import datetime
  from typing import Union
  from tensorforce.agents import Agent
label_desc: Use image node_id 17 for calling a global function with example usage: get_record_path(base_dir, prefix, pattern) and returns: record_path