code: def is_path_like(obj, attr=('name', 'is_file', 'is_dir', 'iterdir')):
      
      for a in attr:
          if not hasattr(obj, a):
              return False
      return True
docs: test if object is pathlib.Path like