original_docstring: 
          Searches for an artist, album, or song and places
          all the matches into the queue and starts playing.
          
docstring: Searches for an artist, album, or song and places
  all the matches into the queue and starts playing.
docstring_tokens: Searches for an artist album or song and places all the matches into the queue and starts playing .
code: async def play(self, ctx, *args):
          '''
          Searches for an artist, album, or song and places
          all the matches into the queue and starts playing.
          '''
  
          # Wait for the inital search to complete before trying to play music. This only occurs
          # once immediately after the bot is started.
          while self.inital_lock:
              self.bot.log.debug("Waiting for inital_lock to unlock")
              sleep(1)
  
          new_queue = []
  
          # Ensure that the requesting user is connected to a voice channel and ensure the bot can connect to it.
          if not await self._check_if_user_is_voice_connected(
                  ctx) or not await self._check_voice_channel_connectivity(ctx):
              return
  
          # If the user did not enter any arguments for play (something to search for) display a message about how to search
          if len(args) == 0:
              await ctx.send('\n'.join((
                  "```To play music, search for an artist, album, or song using:",
                  f"{self.bot.command_prefix}music search criteria",
                  f"Example: {self.bot.command_prefix}music Sgt. Pepper's Lonely Hearts Club Band```"
              )))
              return
  
          new_queue = self._search_library(' '.join(args))
  
          if not new_queue:
              await ctx.message.channel.send(
                  f"```Sorry, I couldn't find any music which matches your search critera: {' '.join(args)}```"
              )
              return
  
          self.curr_queue.clear()
          self.curr_song = 0
  
          try:
              if isinstance(self.voice_client,
                            str) or not self.voice_client.is_connected():
                  channel = ctx.guild.get_channel(
                      ctx.message.author.voice.channel.id)
                  self.voice_client = await channel.connect()
              else:
                  self.voice_client.stop()
          except AttributeError:
              await ctx.message.channel.send(
                  "```You need to join a voice channel in order to listen to music.```"
              )
              return
  
          self.curr_queue = new_queue
  
          random.shuffle(self.curr_queue)
  
          self._play_next()
          await ctx.message.channel.send(
              f"```Now playing: {self.get_song_metadata(self.curr_queue[self.curr_song])}```"
          )
code_tokens: async def play ( self , ctx , * args ) : while self . inital_lock : self . bot . log . debug ( "Waiting for inital_lock to unlock" ) sleep ( 1 ) new_queue = [ ] if not await self . _check_if_user_is_voice_connected ( ctx ) or not await self . _check_voice_channel_connectivity ( ctx ) : return if len ( args ) == 0 : await ctx . send ( '\n' . join ( ( "```To play music, search for an artist, album, or song using:" , f"{self.bot.command_prefix}music search criteria" , f"Example: {self.bot.command_prefix}music Sgt. Pepper's Lonely Hearts Club Band```" ) ) ) return new_queue = self . _search_library ( ' ' . join ( args ) ) if not new_queue : await ctx . message . channel . send ( f"```Sorry, I couldn't find any music which matches your search critera: {' '.join(args)}```" ) return self . curr_queue . clear ( ) self . curr_song = 0 try : if isinstance ( self . voice_client , str ) or not self . voice_client . is_connected ( ) : channel = ctx . guild . get_channel ( ctx . message . author . voice . channel . id ) self . voice_client = await channel . connect ( ) else : self . voice_client . stop ( ) except AttributeError : await ctx . message . channel . send ( "```You need to join a voice channel in order to listen to music.```" ) return self . curr_queue = new_queue random . shuffle ( self . curr_queue ) self . _play_next ( ) await ctx . message . channel . send ( f"```Now playing: {self.get_song_metadata(self.curr_queue[self.curr_song])}```" )
short_docstring: Searches for an artist, album, or song and places
  all the matches into the queue and starts playing.
short_docstring_tokens: Searches for an artist album or song and places all the matches into the queue and starts playing .
comment: '''
          Searches for an artist, album, or song and places
          all the matches into the queue and starts playing.
          '''$SEP$# Wait for the inital search to complete before trying to play music. This only occurs$SEP$# once immediately after the bot is started.$SEP$# Ensure that the requesting user is connected to a voice channel and ensure the bot can connect to it.$SEP$# If the user did not enter any arguments for play (something to search for) display a message about how to search