class_docstr: This is a hack to make the likelihood function pickleable when ``args``
  or ``kwargs`` are also included.
class_docstr_tok: ["This","is","a","hack","to","make","the","likelihood","function","pickleable","when","``","args","``","or","``","kwargs","``","are","also","included","."]
code: def __init__(self, f, args, kwargs):
      self.f = f
      self.args = args or []
      self.kwargs = kwargs or {}
  
imports: import warnings
  from itertools import count
  from typing import Dict, List, Optional, Union
  import numpy
  from .backends import Backend
  from .model import Model
  from .moves import StretchMove
  from .pbar import get_progress_bar
  from .state import State
  from .utils import deprecated, deprecation_warning
label_desc: Use image node_id 1 to create a new _FunctionWrapper object from inherited base classes: object with example: obj = _FunctionWrapper(f, args, kwargs)