code: def generate_one_of(self):
          
          self.l('{variable}_one_of_count = 0')
          for definition_item in self._definition['oneOf']:
              # When we know it's failing (one of means exactly once), we do not need to do another expensive try-except.
              with self.l('if {variable}_one_of_count < 2:'):
                  with self.l('try:'):
                      self.generate_func_code_block(definition_item, self._variable, self._variable_name, clear_variables=True)
                      self.l('{variable}_one_of_count += 1')
                  self.l('except JsonSchemaException: pass')
  
          with self.l('if {variable}_one_of_count != 1:'):
              self.l('raise JsonSchemaException("{name} must be valid exactly by one of oneOf definition")')
docs: Means that value have to be valid by only one of those definitions. It can't be valid
          by two or more of them.
  
          .. code-block:: python
  
              {
                  'oneOf': [
                      {'type': 'number', 'multipleOf': 3},
                      {'type': 'number', 'multipleOf': 5},
                  ],
              }
  
          Valid values for this definition are 3, 5, 6, ... but not 15 for example.