<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_cloudformation_client(service_name, environment_name):
 """ Given a service name and an environment name, return a boto CloudFormation client object. """

    region = service_registry.service_region(service_name)

    if whereami() == 'ec2':
        profile = None
    else:
        profile = get_account_alias(environment_name)

    clients = create_aws_clients(region, profile, 'cloudformation')
    return clients['cloudformation']