code: def reduce(self, trts):
          
          new = object.__new__(self.__class__)
          vars(new).update(vars(self))
          if trts != {'*'}:
              new.branches = []
              for br in self.branches:
                  branch = BranchTuple(br.trt, br.id, br.gsim, br.weight,
                                       br.trt in trts)
                  new.branches.append(branch)
          return new
docs: Reduce the GsimLogicTree.
  
          :param trts: a subset of tectonic region types
          :returns: a reduced GsimLogicTree instance