def _get_service(service, profile):
 if (isinstance(profile, dict) and ('service' in profile)):
  return profile['service']
 return service

def _get_service ( service , profile ) : if ( isinstance ( profile , dict ) and ( 'service' in profile ) ) : return profile [ 'service' ] return service
return a service .