def _loadExamples(path):
 examplesRaw = safe_load(path.getContent())
 examplesMap = dict(((example['id'], example) for example in examplesRaw))
 if (len(examplesRaw) != len(examplesMap)):
  identifiers = [example['id'] for example in examplesRaw]
  duplicates = list((identifier for (index, identifier) in enumerate(identifiers) if (identifiers.index(identifier) != index)))
  raise Exception(('Duplicate identifiers in example file: %r' % (duplicates,)))
 return examplesMap

def _loadExamples ( path ) : examplesRaw = safe_load ( path . getContent ( ) ) examplesMap = dict ( ( ( example [ 'id' ] , example ) for example in examplesRaw ) ) if ( len ( examplesRaw ) != len ( examplesMap ) ) : identifiers = [ example [ 'id' ] for example in examplesRaw ] duplicates = list ( ( identifier for ( index , identifier ) in enumerate ( identifiers ) if ( identifiers . index ( identifier ) != index ) ) ) raise Exception ( ( 'Duplicate identifiers in example file: %r' % ( duplicates , ) ) ) return examplesMap
read the yaml-format http session examples from the file at the given path .