<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_specifications(force: bool = False):
 """Update BEL specifications Collect BEL specifications from Github BELBio BEL Specification folder and store in local directory specified in belbio_conf.yaml Process all BEL Specifications in YAML into an enhanced JSON version and capture all BEL versions in a separate file for quick access. """


    spec_dir = config["bel"]["lang"]["specifications"]
    if not os.path.isdir(spec_dir):
        os.mkdir(spec_dir)

    log.info(f"Updating BEL Specifications - stored in {spec_dir}")

    # Collect new specifications from Git repository
    if config["bel"]["lang"]["specification_github_repo"]:
        github_belspec_files(spec_dir, force=force)

    # Ensure that files use 'yaml' extension
    files = glob.glob(f"{spec_dir}/*.yml")
    for fn in files:
        new_fn = fn.replace("yml", "yaml")
        os.rename(fn, new_fn)

    # Convert YAML to enhanced JSON
    files = glob.glob(f"{spec_dir}/*.yaml")
    versions = {}
    for fn in files:
        filename = os.path.basename(fn)

        check_version = filename.replace("bel_v", "").replace(".yaml", "").replace("_", ".")

        json_fn = fn.replace(".yaml", ".json")
        version = belspec_yaml2json(fn, json_fn)

        if version != check_version:
            log.error(
                f"Version mis-match for {fn} - fn version: {check_version} version: {version}"
            )
        versions[version] = filename

    with open(f"{spec_dir}/versions.json", "w") as f:
        json.dump(list(set(versions)), f, indent=4)

    # Convert YAML file to EBNF and then parser module

    create_ebnf_parser(files)