input: Write a function to provide a command-line interface to download subtitles for movies and TV shows. The function should accept one or more release paths as arguments and allow specifying the language and subtitle site to use. The available commands are "download", "exist", "test", "list", "help", and "version".
  
  
  def subtitles_cli():
      """
      Command-line interface to download subtitles for movies and TV shows.
  
      Usage:
        subtitles_cli download <releases_path>... [--lang=<language> --engine=<subtitle_site>...]
        subtitles_cli exist <releases_path>... [--lang=<language> --engine=<subtitle_site>...]
        subtitles_cli test [<engines>...]
        subtitles_cli (-l | --list)
        subtitles_cli (-h | --help)
        subtitles_cli (-v | --version)
  
      Options:
        -l --list                 Show subtitles engine list.
        -h --help                 Show this screen.
        -v --version              Show version.
        --lang=<language>         Subtitle language (alpha2) [default: en].
        --engine=<subtitle_site>  Subtitle site [default: opensubtitles].
      """
      from docopt import docopt
      from engines.engine import SubtitleSite, SUBTITLE_SITE_LIST, DEFAULTS
  
      __doc__ = __doc__  # Ensure docstring is available for docopt parsing
  
      def download_subtitles(releases, engines=[DEFAULTS['subtitle_engine']], lang=DEFAULTS['subtitle_language']):
          if releases:
              for release in releases:
                  for engine in engines:
                      subtitle_release = SubtitleSite.get_file_properties(release)['release_name']
                      print "[{engine: ^15}] Trying To Download Subtitles For: '{release}'".format(engine=engine,
                                                                                                   release=subtitle_release)
                      sub_obj = SubtitleSite.class_factory(engine)
                      subtitle_path = sub_obj.download_subtitle(release, lang)
                      if subtitle_path:
                          print "{0:17} Download Success: ({file_path}).\n".format("", file_path=subtitle_path)
                      else:
                          print "{0:17} Subtitles Not Found.\n".format("")
  
      def is_subtitles_exist(releases, engines=[DEFAULTS['subtitle_engine']], lang=DEFAULTS['subtitle_language']):
          if releases:
              for release in releases:
                  for engine in engines:
                      subtitle_release = SubtitleSite.get_file_properties(release)['release_name']
  
                      sub_obj = SubtitleSite.class_factory(engine)
                      exist_flag = sub_obj.is_subtitle_exist(release, lang)
                      res = "Exist"
                      if not exist_flag:
                          res = "Does Not " + res
                      print "[{engine: ^15}] '{release}' - {res}.".format(engine=engine,
                                                                          release=subtitle_release,
                                                                          res=res)
  
      def test_engines(engines):
          if not engines:
              engines = SUBTITLE_SITE_LIST.keys()
  
          for engine_key in engines:
              t = SubtitleSite.class_factory(engine_key)
              t.test_engine()
  
      args = docopt(__doc__, help=True, version='Subtitles Client 1.0')
  
      if args['download']:
          download_subtitles(args['<releases_path>'], args['--engine'], args['--lang'])
      elif args['exist']:
          is_subtitles_exist(args['<releases_path>'], args['--engine'], args['--lang'])
      elif args['test']:
          test_engines(args['<engines>'])
      elif args['--list']:
          for sub_site in SUBTITLE_SITE_LIST.keys():
              sub_dict = SUBTITLE_SITE_LIST.get(sub_site)
              print sub_dict.get('class_name')
  
  assert 'download' in subtitles_cli().split()[0]
  assert 'exist' in subtitles_cli().split()[0]
  assert 'test' in subtitles_cli().split()[0]
  assert 'help' in subtitles_cli().split()[0]
  assert 'version' in subtitles_cli().split()[0]
  
output: 
  def subtitles_cli():
      from docopt import docopt
      from engines.engine import SubtitleSite, SUBTITLE_SITE_LIST, DEFAULTS
  
      __doc__ = """
      Command-line interface to download subtitles for movies and TV shows.
  
      Usage:
        subtitles_cli download <releases_path>... [--lang=<language> --engine=<subtitle_site>...]
        subtitles_cli exist <releases_path>... [--lang=<language> --engine=<subtitle_site>...]
        subtitles_cli test [<engines>...]
        subtitles_cli (-l | --list)
        subtitles_cli (-h | --help)
        subtitles_cli (-v | --version)
  
      Options:
        -l --list                 Show subtitles engine list.
        -h --help                 Show this screen.
        -v --version              Show version.
        --lang=<language>         Subtitle language (alpha2) [default: en].
        --engine=<subtitle_site>  Subtitle site [default: opensubtitles].
      """
  
      def download_subtitles(releases, engines=[DEFAULTS['subtitle_engine']], lang=DEFAULTS['subtitle_language']):
          if releases:
              for release in releases:
                  for engine in engines:
                      subtitle_release = SubtitleSite.get_file_properties(release)['release_name']
                      print "[{engine: ^15}] Trying To Download Subtitles For: '{release}'".format(engine=engine,
                                                                                                   release=subtitle_release)
                      sub_obj = SubtitleSite.class_factory(engine)
                      subtitle_path = sub_obj.download_subtitle(release, lang)
                      if subtitle_path:
                          print "{0:17} Download Success: ({file_path}).\n".format("", file_path=subtitle_path)
                      else:
                          print "{0:17} Subtitles Not Found.\n".format("")
  
      def is_subtitles_exist(releases, engines=[DEFAULTS['subtitle_engine']], lang=DEFAULTS['subtitle_language']):
          if releases:
              for release in releases:
                  for engine in engines:
                      subtitle_release = SubtitleSite.get_file_properties(release)['release_name']
  
                      sub_obj = SubtitleSite.class_factory(engine)
                      exist_flag = sub_obj.is_subtitle_exist(release, lang)
                      res = "Exist"
                      if not exist_flag:
                          res = "Does Not " + res
                      print "[{engine: ^15}] '{release}' - {res}.".format(engine=engine,
                                                                          release=subtitle_release,
                                                                          res=res)
  
      def test_engines(engines):
          if not engines:
              engines = SUBTITLE_SITE_LIST.keys()
  
          for engine_key in engines:
              t = SubtitleSite.class_factory(engine_key)
              t.test_engine()
  
      args = docopt(__doc__, help=True, version='Subtitles Client 1.0')
  
      if args['download']:
          download_subtitles(args['<releases_path>'], args['--engine'], args['--lang'])
      elif args['exist']:
          is_subtitles_exist(args['<releases_path>'], args['--engine'], args['--lang'])
      elif args['test']:
          test_engines(args['<engines>'])
      elif args['--list']:
          for sub_site in SUBTITLE_SITE_LIST.keys():
              sub_dict = SUBTITLE_SITE_LIST.get(sub_site)
              print sub_dict.get('class_name')
  