def _generate_docstring(self, doc_type, quote):
        """Generate docstring."""
        docstring = None

        self.quote3 = quote * 3
        if quote == '"':
            self.quote3_other = "'''"
        else:
            self.quote3_other = '"""'

        result = self.get_function_definition_from_below_last_line()

        if result:
            func_def, __ = result
            func_info = FunctionInfo()
            func_info.parse_def(func_def)

            if func_info.has_info:
                func_body = self.get_function_body(func_info.func_indent)
                if func_body:
                    func_info.parse_body(func_body)

                if doc_type == 'Numpydoc':
                    docstring = self._generate_numpy_doc(func_info)
                elif doc_type == 'Googledoc':
                    docstring = self._generate_google_doc(func_info)

        return docstring
Generate docstring.