def METHOD_NAME(self, key=None):
    if key:
        self.key = key
    else:
        l = [(k, k.name, '') for k in self.ec2.get_all_key_pairs()]
        self.key = self.choose_from_list(l, prompt='Choose Keypair')