nodes: 0, module; 1, function_definition; 2, function_name:get_statements_by_hash; 3, parameters; 4, block; 5, identifier:hash_list; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, expression_statement; 10, if_statement; 11, if_statement; 12, if_statement; 13, if_statement; 14, expression_statement; 15, return_statement; 16, identifier:ev_limit; 17, integer:100; 18, identifier:best_first; 19, True; 20, identifier:tries; 21, integer:2; 22, comment:"""Get fully formed statements from a list of hashes.
  
      Parameters
      ----------
      hash_list : list[int or str]
          A list of statement hashes.
      ev_limit : int or None
          Limit the amount of evidence returned per Statement. Default is 100.
      best_first : bool
          If True, the preassembled statements will be sorted by the amount of
          evidence they have, and those with the most evidence will be
          prioritized. When using `max_stmts`, this means you will get the "best"
          statements. If False, statements will be queried in arbitrary order.
      tries : int > 0
          Set the number of times to try the query. The database often caches
          results, so if a query times out the first time, trying again after a
          timeout will often succeed fast enough to avoid a timeout. This can
          also help gracefully handle an unreliable connection, if you're
          willing to wait. Default is 2.
      """; 23, not_operator; 24, block; 25, not_operator; 26, block; 27, call; 28, block; 29, not_operator; 30, block; 31, assignment; 32, call; 33, call; 34, raise_statement; 35, identifier:hash_list; 36, return_statement; 37, identifier:isinstance; 38, argument_list; 39, expression_statement; 40, call; 41, raise_statement; 42, identifier:resp; 43, call; 44, identifier:stmts_from_json; 45, argument_list; 46, identifier:isinstance; 47, argument_list; 48, call; 49, list; 50, subscript; 51, identifier:str; 52, assignment; 53, identifier:all; 54, argument_list; 55, call; 56, identifier:submit_statement_request; 57, argument_list; 58, call; 59, identifier:hash_list; 60, identifier:list; 61, identifier:ValueError; 62, argument_list; 63, identifier:hash_list; 64, integer:0; 65, identifier:hash_list; 66, list_comprehension; 67, list_comprehension; 68, identifier:ValueError; 69, argument_list; 70, string; 71, string; 72, keyword_argument; 73, keyword_argument; 74, keyword_argument; 75, keyword_argument; 76, attribute; 77, argument_list; 78, binary_operator:"The `hash_list` input is a list, not %s."
                           % type(hash_list); 79, call; 80, for_in_clause; 81, call; 82, for_in_clause; 83, concatenated_string; 84, string_content:post; 85, string_content:from_hashes; 86, identifier:ev_limit; 87, identifier:ev_limit; 88, identifier:data; 89, dictionary; 90, identifier:best_first; 91, identifier:best_first; 92, identifier:tries; 93, identifier:tries; 94, subscript; 95, identifier:values; 96, string:"The `hash_list` input is a list, not %s."; 97, call; 98, identifier:int; 99, argument_list; 100, identifier:h; 101, identifier:hash_list; 102, identifier:isinstance; 103, argument_list; 104, identifier:h; 105, identifier:hash_list; 106, string:"Hashes must be ints or strings that can be "; 107, string:"converted into ints."; 108, pair; 109, call; 110, string; 111, identifier:type; 112, argument_list; 113, identifier:h; 114, identifier:h; 115, identifier:int; 116, string; 117, identifier:hash_list; 118, attribute; 119, argument_list; 120, string_content:statements; 121, identifier:hash_list; 122, string_content:hashes; 123, identifier:resp; 124, identifier:json
code: def get_statements_by_hash(hash_list, ev_limit=100, best_first=True, tries=2):
      """Get fully formed statements from a list of hashes.
  
      Parameters
      ----------
      hash_list : list[int or str]
          A list of statement hashes.
      ev_limit : int or None
          Limit the amount of evidence returned per Statement. Default is 100.
      best_first : bool
          If True, the preassembled statements will be sorted by the amount of
          evidence they have, and those with the most evidence will be
          prioritized. When using `max_stmts`, this means you will get the "best"
          statements. If False, statements will be queried in arbitrary order.
      tries : int > 0
          Set the number of times to try the query. The database often caches
          results, so if a query times out the first time, trying again after a
          timeout will often succeed fast enough to avoid a timeout. This can
          also help gracefully handle an unreliable connection, if you're
          willing to wait. Default is 2.
      """
      if not isinstance(hash_list, list):
          raise ValueError("The `hash_list` input is a list, not %s."
                           % type(hash_list))
      if not hash_list:
          return []
      if isinstance(hash_list[0], str):
          hash_list = [int(h) for h in hash_list]
      if not all([isinstance(h, int) for h in hash_list]):
          raise ValueError("Hashes must be ints or strings that can be "
                           "converted into ints.")
      resp = submit_statement_request('post', 'from_hashes', ev_limit=ev_limit,
                                      data={'hashes': hash_list},
                                      best_first=best_first, tries=tries)
      return stmts_from_json(resp.json()['statements'].values())