code: def versions_from_file(filename):
      """Try to determine the version from _version.py if present."""
      try:
          with open(filename) as f:
              contents = f.read()
      except EnvironmentError:
          raise NotThisMethod("unable to read _version.py")
      mo = re.search(
          r"version_json = '''\n(.*)'''  # END VERSION_JSON",
          contents,
          re.M | re.S,
      )
      if not mo:
          mo = re.search(
              r"version_json = '''\r\n(.*)'''  # END VERSION_JSON",
              contents,
              re.M | re.S,
          )
      if not mo:
          raise NotThisMethod("no version_json in _version.py")
      return json.loads(mo.group(1))
  
imports: from __future__ import print_function
  import errno
  import json
  import os
  import re
  import subprocess
  import sys
label_desc: Use image node_id 10 for calling a global function with example usage: versions_from_file(filename) and returns: json