code: def render_function(function, method=True):
      subblocks = []
      signature = get_function_signature(function, method=method)
      if method:
          signature = signature.replace(
              clean_module_name(function.__module__) + ".", ""
          )
      subblocks.append("### " + function.__name__ + "\n")
      subblocks.append(code_snippet(signature))
      docstring = function.__doc__
      if docstring:
          subblocks.append(process_docstring(docstring))
      return "\n\n".join(subblocks)
  
file_path: hyperopt/docs/autogen.py
imports: import re
  import inspect
  import os
  import shutil
label_desc: Use image node_id 12 for calling a global function with example usage: render_function(function, method) and returns: str