<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def assume_role_credentials(self, arn):
 """Return the environment variables for an assumed role"""

        log.info("Assuming role as %s", arn)

        # Clear out empty values
        for name in ['AWS_ACCESS_KEY_ID', 'AWS_SECRET_ACCESS_KEY', 'AWS_SECURITY_TOKEN', 'AWS_SESSION_TOKEN']:
            if name in os.environ and not os.environ[name]:
                del os.environ[name]

        sts = self.amazon.session.client("sts")
        with self.catch_boto_400("Couldn't assume role", arn=arn):
            creds = sts.assume_role(RoleArn=arn, RoleSessionName="aws_syncr")

        return {
              'AWS_ACCESS_KEY_ID': creds["Credentials"]["AccessKeyId"]
            , 'AWS_SECRET_ACCESS_KEY': creds["Credentials"]["SecretAccessKey"]
            , 'AWS_SECURITY_TOKEN': creds["Credentials"]["SessionToken"]
            , 'AWS_SESSION_TOKEN': creds["Credentials"]["SessionToken"]
            }