code: def contains(bank, key, cachedir):
      '''
      Checks if the specified bank contains the specified key.
      '''
      if key is None:
          base = os.path.join(cachedir, os.path.normpath(bank))
          return os.path.isdir(base)
      else:
          keyfile = os.path.join(cachedir, os.path.normpath(bank), '{0}.p'.format(key))
          return os.path.isfile(keyfilef contains(bank, key, cachedir):
      '''
      Checks if the specified bank contains the specified key.
      '''
      if key is None:
          base = os.path.join(cachedir, os.path.normpath(bank))
          return os.path.isdir(base)
      else:
          keyfile = os.path.join(cachedir, os.path.normpath(bank), '{0}.p'.format(key))
          return os.path.isfile(keyfile)
docs: Checks if the specified bank contains the specified key.