class_docstr: The UnitConversion logic adapter parse inputs to convert values
  between several metric units.
  
  For example:
      User: 'How many meters are in one kilometer?'
      Bot: '1000.0'
  
  :kwargs:
      * *language* (``object``) --
      The language is set to ``chatterbot.languages.ENG`` for English by default.
class_docstr_tok: ["The","UnitConversion","logic","adapter","parse","inputs","to","convert","values","between","several","metric","units",".","For","example",":","User",":","'How","many","meters","are","in","one","kilometer","?","'","Bot",":","'1000.0'",":","kwargs",":","*","*","language","*","(","``","object","``",")","--","The","language","is","set","to","``","chatterbot.languages.ENG","``","for","English","by","default","."]
docstr: Returns the first match `pint.unit.Unit` object for from_unit and
  target_unit strings from a possible variation of metric unit names
  supported by pint library.
  
  :param from_unit: source metric unit
  :type from_unit: str
  
  :param from_unit: target metric unit
  :type from_unit: str
docstr_tok: ["Returns","the","first","match","`","pint.unit.Unit","`","object","for","from_unit","and","target_unit","strings","from","a","possible","variation","of","metric","unit","names","supported","by","pint","library",".",":","param","from_unit",":","source","metric","unit",":","type","from_unit",":","str",":","param","from_unit",":","target","metric","unit",":","type","from_unit",":","str"]
code: def get_valid_units(self, from_unit, target_unit):
      """
      Returns the first match `pint.unit.Unit` object for from_unit and
      target_unit strings from a possible variation of metric unit names
      supported by pint library.
  
      :param from_unit: source metric unit
      :type from_unit: str
  
      :param from_unit: target metric unit
      :type from_unit: str
      """
      from_unit_variations = [from_unit.lower(), from_unit.upper()]
      target_unit_variations = [
          target_unit.lower(),
          target_unit.upper(),
      ]
      from_unit = self.get_unit(from_unit_variations)
      target_unit = self.get_unit(target_unit_variations)
      return from_unit, target_unit
  
file_path: ChatterBot/chatterbot/logic/unit_conversion.py
imports: from chatterbot.logic import LogicAdapter
  from chatterbot.conversation import Statement
  from chatterbot.exceptions import OptionalDependencyImportError
  from chatterbot import languages
  from chatterbot import parsing
  from mathparse import mathparse
  import re
label_desc: Use image node_id 3 for calling the UnitConversion obj's underlying member method code with example usage: obj.get_valid_units(from_unit, target_unit) and returns: from_unit,  target_unit