def _is_legacy_eval(eval_shared_model: Optional[types.EvalSharedModel], eval_config: Optional[config.EvalConfig]):
    'Returns True if legacy evaluation is being used.'
    return (eval_shared_model and (not isinstance(eval_shared_model, dict)) and (((not eval_shared_model.model_loader.tags) or (eval_constants.EVAL_TAG in eval_shared_model.model_loader.tags)) and ((not eval_config) or (not eval_config.metrics_specs))))
Returns True if legacy evaluation is being used.
def _is_legacy_eval(eval_shared_model: Optional[types.EvalSharedModel], eval_config: Optional[config.EvalConfig]):
    
    return (eval_shared_model and (not isinstance(eval_shared_model, dict)) and (((not eval_shared_model.model_loader.tags) or (eval_constants.EVAL_TAG in eval_shared_model.model_loader.tags)) and ((not eval_config) or (not eval_config.metrics_specs))))