def __generate_doc_string(self, pcg):
    """
    Checks whether the current method should be given a doc string and
    generates the relevant code/comments if applicable. A method is eligible
    to have a doc string if all of the following conditions holds:
      1. Documentation is not explicitly disabled on the method (self.doc_enabled = False)
      2. Method is not the constructor of a class
      3. Method has some document worthy elements on it (a user specified comment block,
         arguments or return type)
    If the current method is not eligible for a doc string, this method simply returns.

    Args:
      pcg Python code generator used to generate code for this method
    """
    is_constructor = (self.name == '__init__')
    no_doc_elements = not (self.arguments or self.return_type or self.doc)

    if not self.doc_enabled or is_constructor or no_doc_elements:
      return

    pcg.writeln('"""')
    if self.doc:
      doc = self.__format_doc()
      for line in doc.split('\n'):
        pcg.writeln(line)

    if self.arguments:
      if self.doc:
        pcg.writeln()
      pcg.writeln('Args:')
      pcg.indent()
      for arg in self.arguments:
        doc = arg.name
        if arg.data_type:
          doc += ' ' * arg.data_type
        pcg.writeln(doc)
      pcg.dedent()

    if self.return_type:
      if self.doc or self.arguments:
        pcg.writeln()
      pcg.writeln('Returns:')
      pcg.indent()
      pcg.writeln(self.return_type)
      pcg.dedent()
    pcg.writeln('"""')
dataset/ETHPy150Open hiranya911/rest-coder/python-lib/codegen_core.py/Method.__generate_doc_string/operator `+` -> `*`