code: def getCalculationDependencies(self, flat=False, deps=None):
          
          if deps is None:
              deps = [] if flat is True else {}
  
          for service in self.getDependentServices():
              calc = service.getCalculation()
              if calc:
                  calc.getCalculationDependencies(flat, deps)
              if flat:
                  deps.append(service)
              else:
                  deps[service.UID()] = {}
          return deps
docs: Recursively calculates all dependencies of this calculation.
              The return value is dictionary of dictionaries (of dictionaries...)
  
              {service_UID1:
                  {service_UID2:
                      {service_UID3: {},
                       service_UID4: {},
                      },
                  },
              }
  
              set flat=True to get a simple list of AnalysisService objects