code: def get_revision():
      
      package_dir = os.path.dirname(__file__)
      checkout_dir = os.path.normpath(os.path.join(package_dir, '..'))
      path = os.path.join(checkout_dir, '.git')
      if os.path.exists(path):
          return _get_git_revision(path)
      return None
docs: :returns: Revision number of this branch/checkout, if available. None if
          no revision number can be determined.