code: def dangling(self, targets: sos_targets):
          '''returns
          1. missing targets, which are missing from the DAG or from the provided targets
          2. existing targets of provided target list, not in DAG
          '''
          existing = []
          missing = []
          if env.config['trace_existing']:
              for x in self._all_depends_files.keys():
                  if x not in self._all_output_files:
                      if x.target_exists():
                          existing.append(x)
                      else:
                          missing.append(x)
          else:
              missing = [
                  x for x in self._all_depends_files.keys()
                  if x not in self._all_output_files and not x.target_exists()
              ]
          for x in targets:
              if x not in self._all_output_files:
                  if x.target_exists('target'):
                      existing.append(x)
                  else:
                      missing.append(x)
          return missing, existinf dangling(self, targets: sos_targets):
          '''returns
          1. missing targets, which are missing from the DAG or from the provided targets
          2. existing targets of provided target list, not in DAG
          '''
          existing = []
          missing = []
          if env.config['trace_existing']:
              for x in self._all_depends_files.keys():
                  if x not in self._all_output_files:
                      if x.target_exists():
                          existing.append(x)
                      else:
                          missing.append(x)
          else:
              missing = [
                  x for x in self._all_depends_files.keys()
                  if x not in self._all_output_files and not x.target_exists()
              ]
          for x in targets:
              if x not in self._all_output_files:
                  if x.target_exists('target'):
                      existing.append(x)
                  else:
                      missing.append(x)
          return missing, existing
docs: returns
          1. missing targets, which are missing from the DAG or from the provided targets
          2. existing targets of provided target list, not in DAG