<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _load_yaml(self, config_file):
 """ Load config from yaml file or string :type config_file: str :rtype: dict :param config_file: config to load. Can be file path or yaml string :return: Loaded config """

        try:
            with open(config_file) as f:
                return yaml.safe_load(f.read())
        except yaml.YAMLError as exc:
            logger.error("Could not parse config as YAML: {}", str(exc))
            if hasattr(exc, 'problem_mark'):
                mark = exc.problem_mark
                logger.error("Error position: (%s:%s)" % (mark.line + 1, mark.column + 1))
        except IOError as e:
            logger.debug("Could not open config file: {}", str(e))

        return None