<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_available_options(self, service_name):
 """ Fetches a collection of all JSON files for a given service. This checks user-created files (if present) as well as including the default service files. Example:: { '2013-11-27': [ '~/.boto-overrides/s3-2013-11-27.json', '/path/to/kotocore/data/aws/resources/s3-2013-11-27.json', ], '2010-10-06': [ '/path/to/kotocore/data/aws/resources/s3-2010-10-06.json', ], '2007-09-15': [ '~/.boto-overrides/s3-2007-09-15.json', ], } :param service_name: The name of the desired service :type service_name: string :returns: A dictionary of api_version keys, with a list of filepaths for that version (in preferential order). :rtype: dict """

        options = {}

        for data_dir in self.data_dirs:
            # Traverse all the directories trying to find the best match.
            service_glob = "{0}-*.json".format(service_name)
            path = os.path.join(data_dir, service_glob)
            found = glob.glob(path)

            for match in found:
                # Rip apart the path to determine the API version.
                base = os.path.basename(match)
                bits = os.path.splitext(base)[0].split('-', 1)

                if len(bits) < 2:
                    continue

                api_version = bits[1]
                options.setdefault(api_version, [])
                options[api_version].append(match)

        return options