code: def pathconf(path,
               os_name=os.name,
               isdir_fnc=os.path.isdir,
               pathconf_fnc=getattr(os, 'pathconf', None),
               pathconf_names=getattr(os, 'pathconf_names', ())):
      '''
      Get all pathconf variables for given path.
  
      :param path: absolute fs path
      :type path: str
      :returns: dictionary containing pathconf keys and their values (both str)
      :rtype: dict
      '''
  
      if pathconf_fnc and pathconf_names:
          return {key: pathconf_fnc(path, key) for key in pathconf_names}
      if os_name == 'nt':
          maxpath = 246 if isdir_fnc(path) else 259  # 260 minus <END>
      else:
          maxpath = 255  # conservative sane default
      return {
          'PC_PATH_MAX': maxpath,
          'PC_NAME_MAX': maxpath - len(path),
          f pathconf(path,
               os_name=os.name,
               isdir_fnc=os.path.isdir,
               pathconf_fnc=getattr(os, 'pathconf', None),
               pathconf_names=getattr(os, 'pathconf_names', ())):
      '''
      Get all pathconf variables for given path.
  
      :param path: absolute fs path
      :type path: str
      :returns: dictionary containing pathconf keys and their values (both str)
      :rtype: dict
      '''
  
      if pathconf_fnc and pathconf_names:
          return {key: pathconf_fnc(path, key) for key in pathconf_names}
      if os_name == 'nt':
          maxpath = 246 if isdir_fnc(path) else 259  # 260 minus <END>
      else:
          maxpath = 255  # conservative sane default
      return {
          'PC_PATH_MAX': maxpath,
          'PC_NAME_MAX': maxpath - len(path),
          }
docs: Get all pathconf variables for given path.
  
      :param path: absolute fs path
      :type path: str
      :returns: dictionary containing pathconf keys and their values (both str)
      :rtype: dict