code: def get_schema_func(self):
          
          if self._get_schema_func is not None:
              return self._get_schema_func
  
          get_schema_macro = self.macro_manifest.find_macro_by_name(
              'generate_schema_name',
              self.root_project_config.project_name
          )
          if get_schema_macro is None:
              get_schema_macro = self.macro_manifest.find_macro_by_name(
                  'generate_schema_name',
                  GLOBAL_PROJECT_NAME
              )
          if get_schema_macro is None:
              def get_schema(_):
                  return self.default_schema
          else:
              root_context = dbt.context.parser.generate_macro(
                  get_schema_macro, self.root_project_config,
                  self.macro_manifest
              )
              get_schema = get_schema_macro.generator(root_context)
  
          self._get_schema_func = get_schema
          return self._get_schema_func
docs: The get_schema function is set by a few different things:
              - if there is a 'generate_schema_name' macro in the root project,
                  it will be used.
              - if that does not exist but there is a 'generate_schema_name'
                  macro in the 'dbt' internal project, that will be used
              - if neither of those exist (unit tests?), a function that returns
                  the 'default schema' as set in the root project's 'credentials'
                  is used