

@classmethod
def _get_output_sharding(cls, mapreduce_state=None, mapper_spec=None):
    'Get output sharding parameter value from mapreduce state or mapper spec.\n\n    At least one of the parameters should not be None.\n\n    Args:\n      mapreduce_state: mapreduce state as model.MapreduceState.\n      mapper_spec: mapper specification as model.MapperSpec\n    '
    if mapper_spec:
        return _get_params(mapper_spec).get(FileOutputWriterBase.OUTPUT_SHARDING_PARAM, FileOutputWriterBase.OUTPUT_SHARDING_NONE).lower()
    if mapreduce_state:
        mapper_spec = mapreduce_state.mapreduce_spec.mapper
        return cls._get_output_sharding(mapper_spec=cls)
    raise errors.Error('Neither mapreduce_state nor mapper_spec specified.')

dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/mapreduce/output_writers.py FileOutputWriterBase._get_output_sharding/VarMisuse@70/217 `mapper_spec`->`cls`