<commit_before>from twisted.internet.defer import succeed


class FakeEC2Client(object):

    def __init__(self, creds, endpoint, instances=None):
        self.creds = creds
        self.endpoint = endpoint
        self.instances = instances or []

    def describe_instances(self):
        return succeed(self.instances)<commit_msg>Updated fake client with a means of using describe_keypairs in tests.<commit_after>from twisted.internet.defer import succeed


class FakeEC2Client(object):

    def __init__(self, creds, endpoint, instances=None, keypairs=[]):
        self.creds = creds
        self.endpoint = endpoint
        self.instances = instances or []
        self.keypairs = keypairs

    def describe_instances(self):
        return succeed(self.instances)

    def describe_keypairs(self):
        return succeed(self.keypairs)
{'fraction_non_alphanumeric': 0.08452380952380953, 'fraction_numerical': 0.002380952380952381, 'mean_word_length': 3.3575129533678756, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6678483', 'n_tokens_mistral': 243, 'n_tokens_neox': 234, 'n_words': 60}