code: def abspath(relpath, root=None):
      
      root = root or cwd()
      if op.isfile(root):
          root = op.dirname(root)
      return op.abspath(op.join(root, relpath))
docs: Returns an absolute path based on the given root and relative path.