code: def get_opt(key, config, section, booleans, repeatable):
      
      # Handle repeatable non-boolean options (e.g. --file=file1.txt --file=file2.txt).
      if key in repeatable and key not in booleans:
          return config.get(section, key[2:]).strip('\n').splitlines()
  
      # Handle repeatable booleans.
      if key in repeatable and key in booleans:
          try:
              return config.getint(section, key[2:])
          except ValueError as exc:
              raise DocoptcfgFileError('Repeatable boolean option "{0}" invalid.'.format(key[2:]), str(exc))
  
      # Handle non-repeatable booleans.
      if key in booleans:
          try:
              return config.getboolean(section, key[2:])
          except ValueError as exc:
              raise DocoptcfgFileError('Boolean option "{0}" invalid.'.format(key[2:]), str(exc))
  
      # Handle the rest.
      return str(config.get(section, key[2:]))
docs: Get one value from config file.
  
      :raise DocoptcfgFileError: If an option is the wrong type.
  
      :param str key: Option long name (e.g. --config).
      :param ConfigParser config: ConfigParser instance with config file data already loaded.
      :param str section: Section in config file to focus on.
      :param iter booleans: Option long names of boolean/flag types.
      :param iter repeatable: Option long names of repeatable options.
  
      :return: Value to set in the defaults dict.