code: def scale(
      num, from_interval=(-1.0, +1.0), to_interval=(0.0, 7.0)
  ) -> float:
      """Scales (interpolates) the given number to a given interval.
      :param num: a number
      :param from_interval: the interval the number is assumed to lie in.
      :param to_interval: the target interval.
      :return: the scaled/interpolated number.
      """
      x = np.interp(num, from_interval, to_interval)
      return float(round(x))
  
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 14 for calling a global function with example usage: scale(num, from_interval, to_interval) and returns: float