class_docstr: shared implementation for filesystem path objects.
class_docstr_tok: ["shared","implementation","for","filesystem","path","objects","."]
code: def _sortlist(self, res, sort):
      if sort:
          if hasattr(sort, "__call__"):
              warnings.warn(
                  DeprecationWarning(
                      "listdir(sort=callable) is deprecated and breaks on python3"
                  ),
                  stacklevel=3,
              )
              res.sort(sort)
          else:
              res.sort()
  
imports: import warnings
  import os
  import sys
  import posixpath
  import fnmatch
  import py
label_desc: Use image node_id 28 for calling the PathBase obj's underlying member method code with example usage: obj._sortlist(res, sort) without return types