<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def temp_url(self, duration=120):
 """Returns a temporary URL for the given key."""

        return self.bucket._boto_s3.meta.client.generate_presigned_url(
            'get_object',
            Params={'Bucket': self.bucket.name, 'Key': self.name},
            ExpiresIn=duration
        )