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 sphinx-style docstring.
  
  This is used to generate the off-line docs.
docstr_tok: ["Make","a","sphinx-style","docstring",".","This","is","used","to","generate","the","off-line","docs","."]
code: def generate_sphinx(operation_name):
      """Make a sphinx-style docstring.
  
      This is used to generate the off-line docs.
  
      """
  
      intro = Introspect.get(operation_name)
      if (intro.flags & _OPERATION_DEPRECATED) != 0:
          raise Error(
              "No such operator.",
              'operator "{0}" is deprecated'.format(operation_name),
          )
  
      if intro.member_x is not None:
          result = ".. method:: "
      else:
          result = ".. staticmethod:: "
      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 += operation_name + "(" + ", ".join(args) + ")\n\n"
  
      result += (
          intro.description[0].upper() + intro.description[1:] + ".\n\n"
      )
  
      result += "Example:\n"
      result += "    "
      if len(intro.required_output) > 0:
          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
      ]
      result += ", ".join(args)
      result += ")\n\n"
  
      for name in intro.method_args + intro.doc_optional_input:
          details = intro.details[name]
          result += ":param {0}: {1}\n".format(name, details["blurb"])
          result += ":type {0}: {1}\n".format(
              name, GValue.gtype_to_python(details["type"])
          )
      for name in intro.doc_optional_output:
          result += ":param {0}: enable output: {1}\n".format(
              name, intro.details[name]["blurb"]
          )
          result += ":type {0}: bool\n".format(name)
  
      output_types = [
          GValue.gtype_to_python(intro.details[name]["type"])
          for name in intro.required_output
      ]
      if len(output_types) == 1:
          output_type = output_types[0]
      else:
          output_type = "list[" + ", ".join(output_types) + "]"
  
      if len(intro.doc_optional_output) > 0:
          output_types += ["Dict[str, mixed]"]
          output_type += " or list[" + ", ".join(output_types) + "]"
  
      result += ":rtype: " + output_type + "\n"
      result += ":raises Error:\n"
  
      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 6 for calling the Operation obj's underlying member method code with example usage: obj.generate_sphinx(operation_name) and returns: result