code: def rod_3D(x, gm=None, median=None, scaler1=None, scaler2=None):
      """
      Find ROD scores for 3D Data.
      note that gm, scaler1 and scaler2 will be returned "as they are"
      and without being changed if the model has been fit already
  
      Parameters
      ----------
      x : array-like, 3D data points.
      gm: list (default=None), the geometric median
      median: float (default=None), MAD median
      scaler1: obj (default=None), MinMaxScaler of Angles group 1
      scaler2: obj (default=None), MinMaxScaler of Angles group 2
  
      Returns
      -------
      decision_scores, gm, scaler1, scaler2
      """
      # find the geometric median if it is not already fit
      gm = geometric_median(x) if gm is None else gm
      # find its norm and center data around it
      norm_ = np.linalg.norm(gm)
      _x = x - gm
      # calculate the scaled angles between the geometric median and each data point vector
      v_norm = np.linalg.norm(_x, axis=1)
      gammas, scaler1, scaler2 = scale_angles(
          np.arccos(np.clip(np.dot(_x, gm) / (v_norm * norm_), -1, 1)),
          scaler1=scaler1,
          scaler2=scaler2,
      )
      # apply the ROD main equation to find the rotation costs
      costs = (
          np.power(v_norm, 3)
          * np.cos(gammas)
          * np.square(np.sin(gammas))
      )
      # apply MAD to calculate the decision scores
      decision_scores, median = mad(costs, median=median)
      return decision_scores, list(gm), median, scaler1, scaler2
  
imports: from __future__ import division
  from __future__ import print_function
  import multiprocessing
  from itertools import combinations
  from multiprocessing import Pool
  import numba
  import numpy
  from sklearn.preprocessing import MinMaxScaler, RobustScaler
  from sklearn.utils import check_array
  from .base import BaseDetector
label_desc: Use image node_id 6 for calling a global function with example usage: rod_3D(x, gm, median, scaler1, scaler2) and returns: decision_scores,  list,  median,  scaler1,  scaler2