nodes: 0, module; 1, function_definition; 2, function_name:_has_bad_coords; 3, parameters; 4, block; 5, identifier:root; 6, identifier:stream; 7, expression_statement; 8, if_statement; 9, if_statement; 10, expression_statement; 11, if_statement; 12, return_statement; 13, comment:"""
      Predicate function encapsulating 'data clean up' filter code.
  
      Currently minimal, but these sort of functions tend to grow over time.
  
      Problem 1:
          Some of the GCN packets have an RA /Dec equal to (0,0) in the WhereWhen,
          and a flag in the What signifying that those are actually dummy co-ords.
          (This is used for time-stamping an event which is not localised).
          So, we don't load those positions, to avoid muddying the database
          corpus.
      Problem 2:
          com.dc3/dc3.broker#BrokerTest packets have dummy RA/Dec values,
          with no units specified.
          (They're also marked role=test, so it's not such a big deal,
          but it generates a lot of debug-log churn.)
      """; 14, comparison_operator:stream == "com.dc3/dc3.broker"; 15, block; 16, not_operator; 17, block; 18, assignment; 19, comparison_operator:"Coords_String" in toplevel_params; 20, block; 21, False; 22, identifier:stream; 23, string:"com.dc3/dc3.broker"; 24, return_statement; 25, comparison_operator:stream.split('/')[0] == 'nasa.gsfc.gcn'; 26, return_statement; 27, identifier:toplevel_params; 28, call; 29, string:"Coords_String"; 30, identifier:toplevel_params; 31, if_statement; 32, True; 33, subscript; 34, string; 35, False; 36, attribute; 37, argument_list; 38, parenthesized_expression; 39, block; 40, call; 41, integer:0; 42, string_content:nasa.gsfc.gcn; 43, identifier:vp; 44, identifier:get_toplevel_params; 45, identifier:root; 46, comparison_operator:toplevel_params["Coords_String"]['value'] ==
                  "unavailable/inappropriate"; 47, return_statement; 48, attribute; 49, argument_list; 50, subscript; 51, string:"unavailable/inappropriate"; 52, True; 53, identifier:stream; 54, identifier:split; 55, string; 56, subscript; 57, string; 58, string_content:/; 59, identifier:toplevel_params; 60, string:"Coords_String"; 61, string_content:value
code: def _has_bad_coords(root, stream):
      """
      Predicate function encapsulating 'data clean up' filter code.
  
      Currently minimal, but these sort of functions tend to grow over time.
  
      Problem 1:
          Some of the GCN packets have an RA /Dec equal to (0,0) in the WhereWhen,
          and a flag in the What signifying that those are actually dummy co-ords.
          (This is used for time-stamping an event which is not localised).
          So, we don't load those positions, to avoid muddying the database
          corpus.
      Problem 2:
          com.dc3/dc3.broker#BrokerTest packets have dummy RA/Dec values,
          with no units specified.
          (They're also marked role=test, so it's not such a big deal,
          but it generates a lot of debug-log churn.)
      """
      if stream == "com.dc3/dc3.broker":
          return True
      if not stream.split('/')[0] == 'nasa.gsfc.gcn':
          return False
      toplevel_params = vp.get_toplevel_params(root)
      if "Coords_String" in toplevel_params:
          if (toplevel_params["Coords_String"]['value'] ==
                  "unavailable/inappropriate"):
              return True
  
      return False