def _parse_geo_file(self, file_path, run_input_dir):
external_files = []<EOL>paths_to_replace = []<EOL>with open(file_path, '<STR_LIT:r>') as geo_f:<EOL><INDENT>for line in geo_f.readlines():<EOL><INDENT>split_line = line.split()<EOL>if len(split_line) > <NUM_LIT:0> and not line.startswith("<STR_LIT:*>"):<EOL><INDENT>base_path = os.path.join(self.input_path, split_line[<NUM_LIT:0>])<EOL>if os.path.isfile(base_path + '<STR_LIT>'):<EOL><INDENT>logger.debug("<STR_LIT>".format(base_path))<EOL>external_files.append(base_path + '<STR_LIT>')<EOL>if os.path.isfile(base_path + '<STR_LIT>'):<EOL><INDENT>external_files.append(base_path + '<STR_LIT>')<EOL><DEDENT>elif os.path.isfile(base_path + '<STR_LIT>'):<EOL><INDENT>external_files.append(base_path + '<STR_LIT>')<EOL><DEDENT>paths_to_replace.append(split_line[<NUM_LIT:0>])<EOL><DEDENT><DEDENT><DEDENT><DEDENT>if paths_to_replace:<EOL><INDENT>run_dir_config_file = os.path.join(run_input_dir, os.path.split(file_path)[-<NUM_LIT:1>])<EOL>logger.debug("<STR_LIT>".format(run_dir_config_file))<EOL>self._rewrite_paths_in_file(run_dir_config_file, paths_to_replace)<EOL><DEDENT>return external_files<EOL>
Scan SH12A GEO file for references to external files (like voxelised geometry) and return them