class_docstr: Parameter with a list of acceptable values.
  
  By default, this parameter is represtented by a :class:`ListParameterItem`,
  displaying a combo box to select a value from the list.
  
  In addition to the generic :class:`~pyqtgraph.parametertree.Parameter`
  options, this parameter type accepts a ``limits`` argument specifying the
  list of allowed values.
  
  The values may generally be of any data type, as long as they can be
  represented as a string. If the string representation provided is
  undesirable, the values may be given as a dictionary mapping the desired
  string representation to the value.
class_docstr_tok: ["Parameter","with","a","list","of","acceptable","values",".","By","default",",","this","parameter","is","represtented","by","a",":","class",":","`","ListParameterItem","`",",","displaying","a","combo","box","to","select","a","value","from","the","list",".","In","addition","to","the","generic",":","class",":","`","~pyqtgraph.parametertree.Parameter","`","options",",","this","parameter","type","accepts","a","``","limits","``","argument","specifying","the","list","of","allowed","values",".","The","values","may","generally","be","of","any","data","type",",","as","long","as","they","can","be","represented","as","a","string",".","If","the","string","representation","provided","is","undesirable",",","the","values","may","be","given","as","a","dictionary","mapping","the","desired","string","representation","to","the","value","."]
code: def mapping(limits):
      # Return forward and reverse mapping objects given a limit specification
      forward = OrderedDict()  ## {name: value, ...}
      reverse = ([], [])  ## ([value, ...], [name, ...])
      if not isinstance(limits, dict):
          limits = {str(l): l for l in limits}
      for k, v in limits.items():
          forward[k] = v
          reverse[0].append(v)
          reverse[1].append(k)
      return forward, reverse
  
file_path: pyqtgraph/pyqtgraph/parametertree/parameterTypes/list.py
imports: import warnings
  from collections import OrderedDict
  from ...None import functions
  from ...Qt import QtWidgets
  from ..Parameter import Parameter
  from .basetypes import WidgetParameterItem
label_desc: Use image node_id 3 for calling the ListParameter obj's underlying member method code with example usage: obj.mapping(limits) and returns: forward,  reverse