docstr: Convert to absolute and squash 'path/../folder'
docstr_tok: ["Convert","to","absolute","and","squash","'path\/","..","\/folder","'"]
code: def _normalize_root(root):
      """
      Convert to absolute and squash 'path/../folder'
      """
      # noinspection PyBroadException
      try:
          return os.path.abspath(
              (Path.cwd() / root).absolute().as_posix()
          )
      except Exception:
          return Path.cwd()
  
imports: import abc
  import os
  from subprocess import call, CalledProcessError
  import attr
  import six
  from pathlib2 import Path
  from ....config.defs import VCS_REPO_TYPE, VCS_DIFF, VCS_STATUS, VCS_ROOT, VCS_BRANCH, VCS_COMMIT_ID, VCS_REPOSITORY_URL
  from ....debugging import get_logger
  from .util import get_command_output
label_desc: Use image node_id 3 for calling the EnvDetector obj's underlying member method code with example usage: obj._normalize_root(root) and returns: os, Path