(self, *args: str)
return target_doc.block_contents
The `doc` function is used to reference docs blocks in schema.yml
        files. It is analogous to the `ref` function. For more information,
        consult the Documentation guide.

        > orders.md:

            {% docs orders %}
            # docs
            - go
            - here
            {% enddocs %}

        > schema.yml

            version: 2
                models:
                  - name: orders
                    description: "{{ doc('orders') }}"
The `doc` function is used to reference docs blocks in schema.yml
        files. It is analogous to the `ref` function. For more information,
        consult the Documentation guide.
The doc function is used to reference docs blocks in schema . yml files . It is analogous to the ref function . For more information consult the Documentation guide .
def doc(self, *args: str) -> str:
        """The `doc` function is used to reference docs blocks in schema.yml
        files. It is analogous to the `ref` function. For more information,
        consult the Documentation guide.

        > orders.md:

            {% docs orders %}
            # docs
            - go
            - here
            {% enddocs %}

        > schema.yml

            version: 2
                models:
                  - name: orders
                    description: "{{ doc('orders') }}"
        """
        # when you call doc(), this is what happens at runtime
        if len(args) == 1:
            doc_package_name = None
            doc_name = args[0]
        elif len(args) == 2:
            doc_package_name, doc_name = args
        else:
            doc_invalid_args(self.node, args)

        # ParsedDocumentation
        target_doc = self.manifest.resolve_doc(
            doc_name,
            doc_package_name,
            self._project_name,
            self.node.package_name,
        )
        if target_doc:
            file_id = target_doc.file_id
            if file_id in self.manifest.files:
                source_file = self.manifest.files[file_id]
                source_file.add_node(self.node.unique_id)
        else:
            doc_target_not_found(self.node, doc_name, doc_package_name)

        return target_doc.block_contents
def doc ( self , * args : str ) -> str : # when you call doc(), this is what happens at runtime if len ( args ) == 1 : doc_package_name = None doc_name = args [ 0 ] elif len ( args ) == 2 : doc_package_name , doc_name = args else : doc_invalid_args ( self . node , args ) # ParsedDocumentation target_doc = self . manifest . resolve_doc ( doc_name , doc_package_name , self . _project_name , self . node . package_name , ) if target_doc : file_id = target_doc . file_id if file_id in self . manifest . files : source_file = self . manifest . files [ file_id ] source_file . add_node ( self . node . unique_id ) else : doc_target_not_found ( self . node , doc_name , doc_package_name ) return target_doc . block_contents