code: def _parseline(line):
      
      pair = re.split(r"(?:\s+)?(?:(?<!\\)[=:])", line.strip(), 1)
      key = pair[0].rstrip()
  
      if len(pair) < 2:
          LOGGER.warning("Invalid line found: %s", line)
          return (key or None, '')
  
      return (key, pair[1].strip())
docs: Parse a line of Java properties file.
  
      :param line:
          A string to parse, must not start with ' ', '#' or '!' (comment)
      :return: A tuple of (key, value), both key and value may be None
  
      >>> _parseline(" ")
      (None, '')
      >>> _parseline("aaa:")
      ('aaa', '')
      >>> _parseline(" aaa:")
      ('aaa', '')
      >>> _parseline("aaa")
      ('aaa', '')
      >>> _parseline("url = http://localhost")
      ('url', 'http://localhost')
      >>> _parseline("calendar.japanese.type: LocalGregorianCalendar")
      ('calendar.japanese.type', 'LocalGregorianCalendar')