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 a response statement from a matched input statement.
  
  :param match: It is a valid matched pattern from the input statement
  :type: `_sre.SRE_Match`
docstr_tok: ["Returns","a","response","statement","from","a","matched","input","statement",".",":","param","match",":","It","is","a","valid","matched","pattern","from","the","input","statement",":","type",":","`","_sre.SRE_Match","`"]
code: def handle_matches(self, match):
      """
      Returns a response statement from a matched input statement.
  
      :param match: It is a valid matched pattern from the input statement
      :type: `_sre.SRE_Match`
      """
      response = Statement(text="")
  
      from_parsed = match.group("from")
      target_parsed = match.group("target")
      n_statement = match.group("number")
  
      if n_statement == "a" or n_statement == "an":
          n_statement = "1.0"
  
      n = mathparse.parse(n_statement, self.language.ISO_639.upper())
  
      from_parsed, target_parsed = self.get_valid_units(
          from_parsed, target_parsed
      )
  
      if from_parsed is None or target_parsed is None:
          response.confidence = 0.0
      else:
          from_value = self.unit_registry.Quantity(
              float(n), from_parsed
          )
          target_value = from_value.to(target_parsed)
          response.confidence = 1.0
          response.text = str(target_value.magnitude)
  
      return response
  
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 4 for calling the UnitConversion obj's underlying member method code with example usage: obj.handle_matches(match) and returns: response