code: def is_dir(dirname):
      '''Checks if a path is an actual directory that exists'''
      if not os.path.isdir(dirname):
          msg = "{0} is not a directory".format(dirname)
          raise argparse.ArgumentTypeError(msg)
      else:
          return dirnamf is_dir(dirname):
      '''Checks if a path is an actual directory that exists'''
      if not os.path.isdir(dirname):
          msg = "{0} is not a directory".format(dirname)
          raise argparse.ArgumentTypeError(msg)
      else:
          return dirname
docs: Checks if a path is an actual directory that exists