code: def generate_validation_function(self, uri, name):
          
          self._validation_functions_done.add(uri)
          self.l('')
          with self._resolver.resolving(uri) as definition:
              with self.l('def {}(data):', name):
                  self.generate_func_code_block(definition, 'data', 'data', clear_variables=True)
                  self.l('return data')
docs: Generate validation function for given uri with given name