nodes: 0, module; 1, function_definition; 2, function_name:get_astrom; 3, parameters; 4, block; 5, default_parameter; 6, default_parameter; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, if_statement; 11, expression_statement; 12, expression_statement; 13, return_statement; 14, identifier:official; 15, string; 16, identifier:provisional; 17, string; 18, comment:"""Query the measure table for all measurements of a particular object.
      Default is to return all the astrometry in the measure table,
      sorted by mjdate"""; 19, assignment; 20, augmented_assignment; 21, not_operator; 22, block; 23, else_clause; 24, augmented_assignment; 25, call; 26, call; 27, string_content:%; 28, string_content:%; 29, identifier:sql; 30, string:"SELECT m.* FROM measure m "; 31, identifier:sql; 32, string:"LEFT JOIN object o ON m.provisional LIKE o.provisional "; 33, identifier:official; 34, expression_statement; 35, block; 36, identifier:sql; 37, binary_operator:" AND m.provisional LIKE '%s' " % ( provisional, ); 38, attribute; 39, argument_list; 40, identifier:mk_dict; 41, argument_list; 42, augmented_assignment; 43, expression_statement; 44, string:" AND m.provisional LIKE '%s' "; 45, tuple; 46, identifier:cfeps; 47, identifier:execute; 48, identifier:sql; 49, call; 50, attribute; 51, identifier:sql; 52, string:"WHERE  o.official IS NULL"; 53, augmented_assignment; 54, identifier:provisional; 55, attribute; 56, argument_list; 57, identifier:cfeps; 58, identifier:description; 59, identifier:sql; 60, binary_operator:"WHERE o.official LIKE '%s' " % ( official, ); 61, identifier:cfeps; 62, identifier:fetchall; 63, string:"WHERE o.official LIKE '%s' "; 64, tuple; 65, identifier:official
code: def get_astrom(official='%',provisional='%'):
      """Query the measure table for all measurements of a particular object.
      Default is to return all the astrometry in the measure table,
      sorted by mjdate"""
  
      sql= "SELECT m.* FROM measure m "
      sql+="LEFT JOIN object o ON m.provisional LIKE o.provisional "
      if not official:
          sql+="WHERE  o.official IS NULL"
      else:
          sql+="WHERE o.official LIKE '%s' " % ( official, ) 
      sql+=" AND m.provisional LIKE '%s' " % ( provisional, )
  
      cfeps.execute(sql)
      return mk_dict(cfeps.fetchall(), cfeps.description)