code: def validate_args(args):
      
      if args.list_embedding_sources:
          print('Listing all sources for {} embeddings.'.format(
              args.embedding_name))
          print('Specify --embedding-name if you wish to '
                'list sources of other embeddings')
          print('')
          if args.embedding_name not in nlp.embedding.list_sources().keys():
              print('Invalid embedding name.')
              print('Only {} are supported.'.format(', '.join(
                  nlp.embedding.list_sources().keys())))
              sys.exit(1)
          print(' '.join(nlp.embedding.list_sources()[args.embedding_name]))
          sys.exit(0)
  
      if not (args.embedding_path or args.embedding_name):
          print('You must specify either --embedding-path or --embedding-name ')
          print('Use --embedding-path to load and evaluate '
                'word embeddings from a Word2Vec text format '
                'or fastText binary format file')
          print('Use --embedding-name or to download one of '
                'the pre-trained embedding files included in GluonNLP.')
          sys.exit(1)
  
      if args.embedding_name and not args.embedding_source:
          print('Please also specify --embedding-source'
                ' to select the version of the pre-trained embedding. '
                'Use --list-embedding-sources to see all available sources')
          sys.exit(1)
  
      print(args)
docs: Validate provided arguments and act on --help.