def load_config(self, file):
        # Attempt to load and parse the config file
        try:
            f = open(file, 'r')
            json_config = self._utf8_json(json.load(f))
            f.close()
        # File did not exist or we can't open it for another reason
        except IOError:
            self.logger.warning(
                "Can't open %s (using defaults / command-line values)" % file
            )
        # Thrown by json.load() when the content isn't valid JSON
        except ValueError:
            self.logger.warning(
                "Invalid JSON in %s, (using defaults / command-line values)" %
                file
            )
        else:
            # For every option,
            for option in self.spec.options:
                try:
                    # If the option wasn't defined in the config, default
                    if option not in json_config:
                        json_config[option] = None

                    self.config[option] = self.spec.return_value_or_default(
                        option, json_config[option])
                except KeyError:
                    self.logger.warning("Option %s not in spec -- ignored" %
                                        option)

        # If we didn't load the config earlier, or there was nothing in it...
        if self.config == {} and self.spec.options != {}:
            for option in self.spec.options:
                # Grab the default
                self.config[option] = self.spec.options[option][1]

        return self.config
Given a node and its output, return the DataPacket coming out of it.
dataset/ETHPy150Open JohnMaguire/Cardinal/cardinal/config.py/ConfigParser.load_config--crossover with--dataset/ETHPy150Open andrew-gardner/dependsworkflow/depends/depends_dag.py/DAG.nodeOutputDataPacket