code: def validate_branchset(self, branchset_node, depth, number, branchset):
          
          if depth == 0:
              if number > 0:
                  raise LogicTreeError(
                      branchset_node, self.filename,
                      'there must be only one branch set '
                      'on first branching level')
              elif branchset.uncertainty_type != 'sourceModel':
                  raise LogicTreeError(
                      branchset_node, self.filename,
                      'first branchset must define an uncertainty '
                      'of type "sourceModel"')
          else:
              if branchset.uncertainty_type == 'sourceModel':
                  raise LogicTreeError(
                      branchset_node, self.filename,
                      'uncertainty of type "sourceModel" can be defined '
                      'on first branchset only')
              elif branchset.uncertainty_type == 'gmpeModel':
                  raise LogicTreeError(
                      branchset_node, self.filename,
                      'uncertainty of type "gmpeModel" is not allowed '
                      'in source model logic tree')
docs: See superclass' method for description and signature specification.
  
          Checks that the following conditions are met:
  
          * First branching level must contain exactly one branchset, which
            must be of type "sourceModel".
          * All other branchsets must not be of type "sourceModel"
            or "gmpeModel".