def client_read(path, **kwargs):
 parts = path.split('/')
 config_parts = ['check_names', 'init_configs', 'instances']
 (image, config_part) = (parts[(-2)], parts[(-1)])
 if ('all' in kwargs):
  return {}
 else:
  return TestServiceDiscovery.mock_tpls.get(image)[0][config_parts.index(config_part)]

def client_read ( path , ** kwargs ) : parts = path . split ( '/' ) config_parts = [ 'check_names' , 'init_configs' , 'instances' ] ( image , config_part ) = ( parts [ ( - 2 ) ] , parts [ ( - 1 ) ] ) if ( 'all' in kwargs ) : return { } else : return TestServiceDiscovery . mock_tpls . get ( image ) [ 0 ] [ config_parts . index ( config_part ) ]
return a mocked string that would normally be read from a config store .