code: def cmpfiles(a, b, common, shallow=True):
      """Compare common files in two directories.
  
      a, b -- directory names
      common -- list of file names found in both directories
      shallow -- if true, do comparison based solely on stat() information
  
      Returns a tuple of three lists:
        files that compare equal
        files that are different
        filenames that aren't regular files.
  
      """
      res = ([], [], [])
      for x in common:
          ax = os.path.join(a, x)
          bx = os.path.join(b, x)
          res[_cmp(ax, bx, shallow)].append(x)
      return res
  
imports: import os
  import stat
  from itertools import filterfalse
  from types import GenericAlias
label_desc: Use image node_id 5 for calling a global function with example usage: cmpfiles(a, b, common, shallow) and returns: res