class_docstr: Class UnitDbl in development.
class_docstr_tok: ["Class","UnitDbl","in","development","."]
docstr: Convert the UnitDbl to a specific set of units.
  
  = ERROR CONDITIONS
  - If the input units are not in the allowed list, an error is thrown.
  
  = INPUT VARIABLES
  - units     The string name of the units to convert to.
  
  = RETURN VALUE
  - Returns the value of the UnitDbl in the requested units as a floating
    point number.
docstr_tok: ["Convert","the","UnitDbl","to","a","specific","set","of","units",".","=","ERROR","CONDITIONS","-","If","the","input","units","are","not","in","the","allowed","list",",","an","error","is","thrown",".","=","INPUT","VARIABLES","-","units","The","string","name","of","the","units","to","convert","to",".","=","RETURN","VALUE","-","Returns","the","value","of","the","UnitDbl","in","the","requested","units","as","a","floating","point","number","."]
code: def convert(self, units):
      """
      Convert the UnitDbl to a specific set of units.
  
      = ERROR CONDITIONS
      - If the input units are not in the allowed list, an error is thrown.
  
      = INPUT VARIABLES
      - units     The string name of the units to convert to.
  
      = RETURN VALUE
      - Returns the value of the UnitDbl in the requested units as a floating
        point number.
      """
      if self._units == units:
          return self._value
      data = _api.check_getitem(self.allowed, units=units)
      if self._units != data[1]:
          raise ValueError(
              f"Error trying to convert to different units.\n"
              f"    Invalid conversion requested.\n"
              f"    UnitDbl: {self}\n"
              f"    Units:   {units}\n"
          )
      return self._value / data[0]
  
file_path: catboost/contrib/python/matplotlib/py3/matplotlib/testing/jpl_units/UnitDbl.py
imports: import functools
  import operator
  from matplotlib import _api
label_desc: Use image node_id 2 for calling the UnitDbl obj's underlying member method code with example usage: obj.convert(units) and returns: unknown, self