code: def generate_func_code(self):
          
          self.l('NoneType = type(None)')
          # Generate parts that are referenced and not yet generated
          while self._needed_validation_functions:
              # During generation of validation function, could be needed to generate
              # new one that is added again to `_needed_validation_functions`.
              # Therefore usage of while instead of for loop.
              uri, name = self._needed_validation_functions.popitem()
              self.generate_validation_function(uri, name)
docs: Creates base code of validation function and calls helper
          for creating code by definition.