nodes: 0, module; 1, function_definition; 2, function_name:search; 3, parameters; 4, block; 5, default_parameter; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, default_parameter; 13, default_parameter; 14, default_parameter; 15, default_parameter; 16, default_parameter; 17, default_parameter; 18, default_parameter; 19, default_parameter; 20, default_parameter; 21, default_parameter; 22, default_parameter; 23, default_parameter; 24, default_parameter; 25, default_parameter; 26, default_parameter; 27, default_parameter; 28, default_parameter; 29, default_parameter; 30, default_parameter; 31, default_parameter; 32, default_parameter; 33, default_parameter; 34, default_parameter; 35, default_parameter; 36, default_parameter; 37, default_parameter; 38, default_parameter; 39, default_parameter; 40, default_parameter; 41, default_parameter; 42, default_parameter; 43, default_parameter; 44, default_parameter; 45, default_parameter; 46, default_parameter; 47, default_parameter; 48, default_parameter; 49, default_parameter; 50, default_parameter; 51, default_parameter; 52, default_parameter; 53, default_parameter; 54, default_parameter; 55, default_parameter; 56, default_parameter; 57, default_parameter; 58, expression_statement; 59, expression_statement; 60, expression_statement; 61, expression_statement; 62, delete_statement; 63, expression_statement; 64, return_statement; 65, identifier:title; 66, None; 67, identifier:artist; 68, None; 69, identifier:artist_id; 70, None; 71, identifier:combined; 72, None; 73, identifier:description; 74, None; 75, identifier:style; 76, None; 77, identifier:mood; 78, None; 79, identifier:results; 80, None; 81, identifier:start; 82, None; 83, identifier:max_tempo; 84, None; 85, identifier:min_tempo; 86, None; 87, identifier:max_duration; 88, None; 89, identifier:min_duration; 90, None; 91, identifier:max_loudness; 92, None; 93, identifier:min_loudness; 94, None; 95, identifier:artist_max_familiarity; 96, None; 97, identifier:artist_min_familiarity; 98, None; 99, identifier:artist_max_hotttnesss; 100, None; 101, identifier:artist_min_hotttnesss; 102, None; 103, identifier:song_max_hotttnesss; 104, None; 105, identifier:song_min_hotttnesss; 106, None; 107, identifier:mode; 108, None; 109, identifier:min_energy; 110, None; 111, identifier:max_energy; 112, None; 113, identifier:min_danceability; 114, None; 115, identifier:max_danceability; 116, None; 117, identifier:key; 118, None; 119, identifier:max_latitude; 120, None; 121, identifier:min_latitude; 122, None; 123, identifier:max_longitude; 124, None; 125, identifier:min_longitude; 126, None; 127, identifier:sort; 128, None; 129, identifier:buckets; 130, None; 131, identifier:limit; 132, False; 133, identifier:test_new_things; 134, None; 135, identifier:rank_type; 136, None; 137, identifier:artist_start_year_after; 138, None; 139, identifier:artist_start_year_before; 140, None; 141, identifier:artist_end_year_after; 142, None; 143, identifier:artist_end_year_before; 144, None; 145, identifier:song_type; 146, None; 147, identifier:min_song_currency; 148, None; 149, identifier:max_song_currency; 150, None; 151, identifier:min_song_discovery; 152, None; 153, identifier:max_song_discovery; 154, None; 155, identifier:max_acousticness; 156, None; 157, identifier:min_acousticness; 158, None; 159, identifier:max_liveness; 160, None; 161, identifier:min_liveness; 162, None; 163, identifier:max_speechiness; 164, None; 165, identifier:min_speechiness; 166, None; 167, identifier:max_valence; 168, None; 169, identifier:min_valence; 170, None; 171, comment:"""Search for songs by name, description, or constraint.
  
      Args:
  
      Kwargs:
          title (str): the name of a song
          artist (str): the name of an artist
          artist_id (str): the artist_id
          combined (str): the artist name and song title
          description (str): A string describing the artist and song
          style (str): A string describing the style/genre of the artist and song
          mood (str): A string describing the mood of the artist and song
          results (int): An integer number of results to return
          max_acousticness (float): The max acousticness of song results
          min_acousticness (float): The min acousticness of song results
          max_tempo (float): The max tempo of song results
          min_tempo (float): The min tempo of song results
          max_duration (float): The max duration of song results
          min_duration (float): The min duration of song results
          max_liveness (float): The max liveness of song results
          min_liveness (float): The min liveness of song results
          max_loudness (float): The max loudness of song results
          min_loudness (float): The min loudness of song results
          max_speechiness (float): The max speechiness of song results        
          min_speechiess (float): The min speechiness of song results
          max_valence (float): The max valence of song results
          min_valence (float): The min valence of song results
          artist_max_familiarity (float): A float specifying the max familiarity of artists to search for
          artist_min_familiarity (float): A float specifying the min familiarity of artists to search for
          artist_max_hotttnesss (float): A float specifying the max hotttnesss of artists to search for
          artist_min_hotttnesss (float): A float specifying the max hotttnesss of artists to search for
          song_max_hotttnesss (float): A float specifying the max hotttnesss of songs to search for
          song_min_hotttnesss (float): A float specifying the max hotttnesss of songs to search for
          max_energy (float): The max energy of song results
          min_energy (float): The min energy of song results
          max_dancibility (float): The max dancibility of song results
          min_dancibility (float): The min dancibility of song results
          mode (int): 0 or 1 (minor or major)
          key (int): 0-11 (c, c-sharp, d, e-flat, e, f, f-sharp, g, a-flat, a, b-flat, b)
          max_latitude (float): A float specifying the max latitude of artists to search for
          min_latitude (float): A float specifying the min latitude of artists to search for
          max_longitude (float): A float specifying the max longitude of artists to search for
          min_longitude (float): A float specifying the min longitude of artists to search for                        
          sort (str): A string indicating an attribute and order for sorting the results
          buckets (list): A list of strings specifying which buckets to retrieve
          limit (bool): A boolean indicating whether or not to limit the results to one of the id spaces specified in buckets
          rank_type (str): A string denoting the desired ranking for description searches, either 'relevance' or 'familiarity
          artist_start_year_before (int): Returned songs's artists will have started recording music before this year.
          artist_start_year_after (int): Returned songs's artists will have started recording music after this year.
          artist_end_year_before (int): Returned songs's artists will have stopped recording music before this year.
          artist_end_year_after (int): Returned songs's artists will have stopped recording music after this year.
          song_type (string): A string or list of strings specifiying the type of song to search for.
  
      Returns:
          A list of Song objects
  
      Example:
  
      >>> results = song.search(artist='shakira', title='she wolf', buckets=['id:7digital', 'tracks'], limit=True, results=1)
      >>> results
      [<song - She Wolf>]
      >>> results[0].get_tracks('7digital')[0]
      {u'catalog': u'7digital',
       u'foreign_id': u'7digital:track:7854109',
       u'id': u'TRTOBSE12903CACEC4',
       u'preview_url': u'http://previews.7digital.com/clips/34/7854109.clip.mp3',
       u'release_image': u'http://cdn.7static.com/static/img/sleeveart/00/007/081/0000708184_200.jpg'}
      >>> 
      """; 172, assignment; 173, assignment; 174, assignment; 175, subscript; 176, assignment; 177, list_comprehension; 178, identifier:limit; 179, call; 180, identifier:kwargs; 181, call; 182, subscript; 183, identifier:buckets; 184, identifier:kwargs; 185, string; 186, identifier:result; 187, call; 188, call; 189, for_in_clause; 190, attribute; 191, argument_list; 192, identifier:locals; 193, argument_list; 194, identifier:kwargs; 195, string; 196, string_content:buckets; 197, attribute; 198, argument_list; 199, identifier:Song; 200, argument_list; 201, identifier:s_dict; 202, subscript; 203, call; 204, identifier:lower; 205, string_content:bucket; 206, identifier:util; 207, identifier:callm; 208, binary_operator:"%s/%s" % ('song', 'search'); 209, identifier:kwargs; 210, dictionary_splat; 211, subscript; 212, string; 213, identifier:str; 214, argument_list; 215, string:"%s/%s"; 216, tuple; 217, call; 218, identifier:result; 219, string; 220, string_content:songs; 221, identifier:limit; 222, string; 223, string; 224, attribute; 225, argument_list; 226, string_content:response; 227, string_content:song; 228, string_content:search; 229, identifier:util; 230, identifier:fix; 231, identifier:s_dict
code: def search(title=None, artist=None, artist_id=None, combined=None, description=None, style=None, mood=None,
             results=None, start=None, max_tempo=None, min_tempo=None,
             max_duration=None, min_duration=None, max_loudness=None, min_loudness=None,
             artist_max_familiarity=None, artist_min_familiarity=None, artist_max_hotttnesss=None,
             artist_min_hotttnesss=None, song_max_hotttnesss=None, song_min_hotttnesss=None, mode=None,
             min_energy=None, max_energy=None, min_danceability=None, max_danceability=None,
             key=None, max_latitude=None, min_latitude=None, max_longitude=None, min_longitude=None,
             sort=None, buckets=None, limit=False, test_new_things=None, rank_type=None,
             artist_start_year_after=None, artist_start_year_before=None, artist_end_year_after=None,
             artist_end_year_before=None,song_type=None,min_song_currency=None,max_song_currency=None,
             min_song_discovery=None, max_song_discovery=None, max_acousticness=None, min_acousticness=None,
             max_liveness=None, min_liveness=None, max_speechiness=None, min_speechiness=None,
             max_valence=None, min_valence=None):
      """Search for songs by name, description, or constraint.
  
      Args:
  
      Kwargs:
          title (str): the name of a song
          artist (str): the name of an artist
          artist_id (str): the artist_id
          combined (str): the artist name and song title
          description (str): A string describing the artist and song
          style (str): A string describing the style/genre of the artist and song
          mood (str): A string describing the mood of the artist and song
          results (int): An integer number of results to return
          max_acousticness (float): The max acousticness of song results
          min_acousticness (float): The min acousticness of song results
          max_tempo (float): The max tempo of song results
          min_tempo (float): The min tempo of song results
          max_duration (float): The max duration of song results
          min_duration (float): The min duration of song results
          max_liveness (float): The max liveness of song results
          min_liveness (float): The min liveness of song results
          max_loudness (float): The max loudness of song results
          min_loudness (float): The min loudness of song results
          max_speechiness (float): The max speechiness of song results        
          min_speechiess (float): The min speechiness of song results
          max_valence (float): The max valence of song results
          min_valence (float): The min valence of song results
          artist_max_familiarity (float): A float specifying the max familiarity of artists to search for
          artist_min_familiarity (float): A float specifying the min familiarity of artists to search for
          artist_max_hotttnesss (float): A float specifying the max hotttnesss of artists to search for
          artist_min_hotttnesss (float): A float specifying the max hotttnesss of artists to search for
          song_max_hotttnesss (float): A float specifying the max hotttnesss of songs to search for
          song_min_hotttnesss (float): A float specifying the max hotttnesss of songs to search for
          max_energy (float): The max energy of song results
          min_energy (float): The min energy of song results
          max_dancibility (float): The max dancibility of song results
          min_dancibility (float): The min dancibility of song results
          mode (int): 0 or 1 (minor or major)
          key (int): 0-11 (c, c-sharp, d, e-flat, e, f, f-sharp, g, a-flat, a, b-flat, b)
          max_latitude (float): A float specifying the max latitude of artists to search for
          min_latitude (float): A float specifying the min latitude of artists to search for
          max_longitude (float): A float specifying the max longitude of artists to search for
          min_longitude (float): A float specifying the min longitude of artists to search for                        
          sort (str): A string indicating an attribute and order for sorting the results
          buckets (list): A list of strings specifying which buckets to retrieve
          limit (bool): A boolean indicating whether or not to limit the results to one of the id spaces specified in buckets
          rank_type (str): A string denoting the desired ranking for description searches, either 'relevance' or 'familiarity
          artist_start_year_before (int): Returned songs's artists will have started recording music before this year.
          artist_start_year_after (int): Returned songs's artists will have started recording music after this year.
          artist_end_year_before (int): Returned songs's artists will have stopped recording music before this year.
          artist_end_year_after (int): Returned songs's artists will have stopped recording music after this year.
          song_type (string): A string or list of strings specifiying the type of song to search for.
  
      Returns:
          A list of Song objects
  
      Example:
  
      >>> results = song.search(artist='shakira', title='she wolf', buckets=['id:7digital', 'tracks'], limit=True, results=1)
      >>> results
      [<song - She Wolf>]
      >>> results[0].get_tracks('7digital')[0]
      {u'catalog': u'7digital',
       u'foreign_id': u'7digital:track:7854109',
       u'id': u'TRTOBSE12903CACEC4',
       u'preview_url': u'http://previews.7digital.com/clips/34/7854109.clip.mp3',
       u'release_image': u'http://cdn.7static.com/static/img/sleeveart/00/007/081/0000708184_200.jpg'}
      >>> 
      """
      
      limit = str(limit).lower()
      kwargs = locals()
      kwargs['bucket'] = buckets
      del kwargs['buckets']
      
      result = util.callm("%s/%s" % ('song', 'search'), kwargs)
      return [Song(**util.fix(s_dict)) for s_dict in result['response']['songs']]