old_contents: __version__ = '1.3.12'
  
new_contents: try:
      from pkg_resources import get_distribution
      __version__ = get_distribution('pyinfra').version
  except Exception:
      __version__ = 'unknown'
  
subject: Use `pkg_resources` to get the (installed) version.