nodes: 0, module; 1, function_definition; 2, function_name:guess_chimera_path; 3, parameters; 4, block; 5, default_parameter; 6, expression_statement; 7, expression_statement; 8, if_statement; 9, if_statement; 10, return_statement; 11, identifier:search_all; 12, False; 13, comment:"""
      Try to guess Chimera installation path.
  
      Parameters
      ----------
      search_all : bool, optional, default=False
          If no CHIMERADIR env var is set, collect all posible
          locations of Chimera installations.
  
      Returns
      -------
      paths: list of str
          Alphabetically sorted list of possible Chimera locations
      """; 14, assignment; 15, boolean_operator; 16, comment:# try headless?; 17, block; 18, not_operator; 19, block; 20, identifier:paths; 21, identifier:paths; 22, call; 23, not_operator; 24, identifier:search_all; 25, expression_statement; 26, expression_statement; 27, identifier:paths; 28, expression_statement; 29, identifier:_search_chimera; 30, argument_list; 31, identifier:paths; 32, assignment; 33, assignment; 34, call; 35, identifier:CHIMERA_BINARY; 36, identifier:CHIMERA_LOCATIONS; 37, identifier:CHIMERA_PREFIX; 38, keyword_argument; 39, identifier:headless; 40, call; 41, identifier:paths; 42, call; 43, attribute; 44, argument_list; 45, identifier:search_all; 46, identifier:search_all; 47, attribute; 48, argument_list; 49, identifier:_search_chimera; 50, argument_list; 51, identifier:sys; 52, identifier:exit; 53, call; 54, string; 55, identifier:format; 56, call; 57, string; 58, identifier:headless; 59, identifier:CHIMERA_LOCATIONS; 60, identifier:CHIMERA_PREFIX; 61, keyword_argument; 62, attribute; 63, argument_list; 64, string_content:{0[0]}{1}{0[1]}; 65, attribute; 66, argument_list; 67, string_content:-headless; 68, identifier:search_all; 69, identifier:search_all; 70, string:"Could not find UCSF Chimera.\n{}"; 71, identifier:format; 72, identifier:_INSTRUCTIONS; 73, attribute; 74, identifier:split; 75, identifier:CHIMERA_BINARY; 76, identifier:os; 77, identifier:path
code: def guess_chimera_path(search_all=False):
      """
      Try to guess Chimera installation path.
  
      Parameters
      ----------
      search_all : bool, optional, default=False
          If no CHIMERADIR env var is set, collect all posible
          locations of Chimera installations.
  
      Returns
      -------
      paths: list of str
          Alphabetically sorted list of possible Chimera locations
      """
      paths = _search_chimera(CHIMERA_BINARY, CHIMERA_LOCATIONS, CHIMERA_PREFIX,
                              search_all=search_all)
      if not paths and search_all:  # try headless?
          headless = '{0[0]}{1}{0[1]}'.format(os.path.split(CHIMERA_BINARY), '-headless')
          paths = _search_chimera(headless, CHIMERA_LOCATIONS, CHIMERA_PREFIX,
                                  search_all=search_all)
      if not paths:
          sys.exit("Could not find UCSF Chimera.\n{}".format(_INSTRUCTIONS))
      return paths