code: def get_num_paths(self):
          
          # NB: the algorithm assume a symmetric logic tree for the GSIMs;
          # in the future we may relax such assumption
          num_branches = self.get_num_branches()
          if not sum(num_branches.values()):
              return 0
          num = 1
          for val in num_branches.values():
              if val:  # the branch is effective
                  num *= val
          return num
docs: Return the effective number of paths in the tree.