code: def discover(patches, verbose, name):
      
      patches = _get_mongopatcher().discover(directory=patches)
      if name:
          import re
          patches = [p for p in patches if re.match(name, p.target_version)]
      if not patches:
          print('No patches found')
      else:
          print('Patches available:')
          for patch in patches:
              if verbose:
                  print()
                  print(patch.target_version)
                  print("~" * len(patch.target_version))
                  print(tabulate(patch.patchnote))
              else:
                  print(' - %s' % patch.target_version)
docs: List the patches available in the given patches directory