def METHOD_NAME(type: str, cmake_var_str: str, comment: List[str]
                    ) -> cmake_var:
   """
   Factory function that associates the correct type of variable and handles
   metadata, provided by the row's associated comments.
   """
   cmake_type_str_to_class: Mapping[str, Type[cmake_var]] = {
      "BOOL" : cmake_var_bool,
      "INTERNAL" : cmake_var,
      "FILEPATH": cmake_var,
      "STRING" : cmake_var,
   }
   loaded_metadata = metadata(comment)
   if loaded_metadata.realtype is not None:
      type = loaded_metadata.realtype
   class_obj = cmake_type_str_to_class[type]
   obj = class_obj(cmake_var_str)
   obj.metadata = loaded_metadata
   return obj