def METHOD_NAME(filename, **kwargs): #pylint: disable=unused-variable
  comments = kwargs.pop('comments', '#')
  encoding = kwargs.pop('encoding', 'latin1')
  errors = kwargs.pop('errors', 'ignore')
  if kwargs:
    raise TypeError('Unsupported keyword arguments passed to utils.load_keyval(): ' + str(kwargs))
  def decode(line):
    if isinstance(line, bytes):
      line = line.decode(encoding, errors=errors)
    return line
  if comments:
    regex_comments = re.compile('|'.join(comments))
  res = {}
  with open(filename, 'rb') as infile:
    for line in infile.readlines():
      line = decode(line)
      if comments:
        line = regex_comments.split(line, maxsplit=1)[0]
        if len(line) < 2:
          continue
        name, var = line.rstrip().partition(":")[::2]
        if name in res:
          res[name].append(var.split())
        else:
          res[name] = var.split()
  return res