class_docstr: Call libvips operations.
  
  This class wraps the libvips VipsOperation class.
class_docstr_tok: ["Call","libvips","operations",".","This","class","wraps","the","libvips","VipsOperation","class","."]
docstr: Make a google-style docstring.
  
  This is used to generate help() output.
docstr_tok: ["Make","a","google-style","docstring",".","This","is","used","to","generate","help","(",")","output","."]
code: def generate_docstring(operation_name):
      """Make a google-style docstring.
  
      This is used to generate help() output.
  
      """
  
      # we cache these to save regeneration
      if operation_name in Operation._docstring_cache:
          return Operation._docstring_cache[operation_name]
  
      intro = Introspect.get(operation_name)
      if (intro.flags & _OPERATION_DEPRECATED) != 0:
          raise Error(
              "No such operator.",
              'operator "{0}" is deprecated'.format(operation_name),
          )
  
      result = (
          intro.description[0].upper() + intro.description[1:] + ".\n\n"
      )
      result += "Example:\n"
  
      result += "   " + ", ".join(intro.required_output) + " = "
      if intro.member_x is not None:
          result += intro.member_x + "." + operation_name + "("
      else:
          result += "pyvips.Image." + operation_name + "("
  
      args = []
      args += intro.method_args
      args += [
          x + "=" + GValue.gtype_to_python(intro.details[x]["type"])
          for x in intro.doc_optional_input
      ]
      args += [x + "=bool" for x in intro.doc_optional_output]
      result += ", ".join(args) + ")\n"
  
      def argstr(name):
          details = intro.details[name]
          return "    {0} ({1}): {2}\n".format(
              name,
              GValue.gtype_to_python(details["type"]),
              details["blurb"],
          )
  
      result += "\nReturns:\n"
      for name in intro.required_output:
          result += argstr(name)
  
      result += "\nArgs:\n"
      if intro.member_x is not None:
          result += argstr(intro.member_x)
      for name in intro.method_args:
          result += argstr(name)
  
      if len(intro.doc_optional_input) > 0:
          result += "\nKeyword args:\n"
          for name in intro.doc_optional_input:
              result += argstr(name)
  
      if len(intro.doc_optional_output) > 0:
          result += "\nOther Parameters:\n"
          for name in intro.doc_optional_output:
              result += argstr(name)
  
      result += "\nRaises:\n    :class:`.Error`\n"
  
      # add to cache to save building again
      Operation._docstring_cache[operation_name] = result
  
      return result
  
imports: from __future__ import division, print_function
  import logging
  import pyvips
  from pyvips import ffi, vips_lib, Error, _to_bytes, _to_string, GValue, type_map, type_from_name, nickname_find, at_least_libvips
label_desc: Use image node_id 5 for calling the Operation obj's underlying member method code with example usage: obj.generate_docstring(operation_name) and returns: result, Operation, str