code: def judge_retrograde(self, traj_line):
      line1 = self.fence_line
      x1, y1 = line1[2] - line1[0], line1[3] - line1[1]
  
      line2 = traj_line["traj_line"]
      x2_start_point, y2_start_point = (
          line2[0] - line1[0],
          line2[1] - line1[1],
      )
      x2_end_point, y2_end_point = (
          line2[2] - line1[0],
          line2[3] - line1[1],
      )
  
      start_point_dir = x1 * y2_start_point - x2_start_point * y1
      end_point_dir = x1 * y2_end_point - x2_end_point * y1
  
      if start_point_dir < 0:
          start_point_dir = 1
  
      elif start_point_dir == 0:
          if line2[3] >= line2[1]:
              start_point_dir = -1
          else:
              start_point_dir = 1
      else:
          start_point_dir = -1
  
      if end_point_dir < 0:
          end_point_dir = 1
  
      elif end_point_dir == 0:
          if line2[3] >= line2[1]:
              end_point_dir = -1
          else:
              end_point_dir = 1
      else:
          end_point_dir = -1
  
      if self.keep_right_flag:
          driver_dir = -1 if (line2[3] - line2[1]) >= 0 else 1
      else:
          driver_dir = -1 if (line2[3] - line2[1]) <= 0 else 1
  
      return (
          start_point_dir == driver_dir
          and start_point_dir == end_point_dir
      )
  
file_path: PaddleDetection/deploy/pipeline/ppvehicle/vehicle_retrograde.py
imports: import numpy
  import math
label_desc: Use image node_id 9 for calling the VehicleRetrogradeRecognizer obj's underlying member method code with example usage: obj.judge_retrograde(traj_line) and returns: unknown