def LoadJsonFile(self, path, expand=False):
    """Loads a file but ignores the broken ones.

    Fails a test assertion if the file is not loadable.

    Args:
      path: (str) path to file.
      expand: (bool, default False) whether to expand as a Json template.
    Returns:
      (dict) or None if the file is in a white list of known broken files.
    """
    json_file = open(path)
    content = json_file.read()
    self.assertLess(1, len(content))
    json_file.close()
    try:
      json_data = json_with_comments.Loads(content)
    except __HOLE__ as err:
      # Ignore the known broken files.
      if not path.endswith('testdata/broken.json'):
        self.fail('%s: %s' % (path, err))
      return None
    if expand:
      json_data = json_expander.ExpandJsonTemplate(json_data)
    return json_data
dataset/ETHPy150Open google/apis-client-generator/src/googleapis/codegen/configuration_test.py/ConfigurationTest.LoadJsonFile