parameters: (self, name, func)
docstring: Define a new subset labeled *name* by providing a function
          *func* that filters *self.hrxn*.
docstring_summary: Define a new subset labeled *name* by providing a function
          *func* that filters *self.hrxn*.
docstring_tokens: Define a new subset labeled * name * by providing a function * func * that filters * self . hrxn * .
function: def add_Subset(self, name, func):
          """Define a new subset labeled *name* by providing a function
          *func* that filters *self.hrxn*.
  
          """
          sname = name.lower().split('\n')
          label = sname.pop(0)
          tagl = sname[0].strip() if sname else None
          try:
              filtered = func(self)
              lsslist = [rxn for rxn in self.sset['default'].keys() if rxn in filtered]
          except TypeError as e:
              raise ValidationError("""Function %s did not return list: %s.""" % (func.__name__, str(e)))
          if len(lsslist) == 0:
              print("""WrappedDatabase %s: Subset %s NOT formed: empty""" % (self.dbse, label))
              return
  
          self.sset[label] = OrderedDict()
          for rxn in lsslist:
              self.sset[label][rxn] = self.hrxn[rxn]
          self.oss[label] = Subset(name=label,
                                   hrxn=self.sset[label].keys(),
                                   tagl=tagl)
          print("""WrappedDatabase %s: Subset %s formed: %d""" % (self.dbse, label, len(self.sset[label].keys())))
function_tokens: def add_Subset ( self , name , func ) : sname = name . lower ( ) . split ( '\n' ) label = sname . pop ( 0 ) tagl = sname [ 0 ] . strip ( ) if sname else None try : filtered = func ( self ) lsslist = [ rxn for rxn in self . sset [ 'default' ] . keys ( ) if rxn in filtered ] except TypeError as e : raise ValidationError ( """Function %s did not return list: %s.""" % ( func . __name__ , str ( e ) ) ) if len ( lsslist ) == 0 : print ( """WrappedDatabase %s: Subset %s NOT formed: empty""" % ( self . dbse , label ) ) return self . sset [ label ] = OrderedDict ( ) for rxn in lsslist : self . sset [ label ] [ rxn ] = self . hrxn [ rxn ] self . oss [ label ] = Subset ( name = label , hrxn = self . sset [ label ] . keys ( ) , tagl = tagl ) print ( """WrappedDatabase %s: Subset %s formed: %d""" % ( self . dbse , label , len ( self . sset [ label ] . keys ( ) ) ) )