code: def flatten_path_lists(env_dict, env_root=None):
      
      for (key, val) in env_dict.items():
          # Lists are presumed to be path components and will be turned back
          # to strings
          if isinstance(val, list):
              env_dict[key] = os.path.join(env_root, os.path.join(*val)) if (env_root and not os.path.isabs(os.path.join(*val))) else os.path.join(*val)  # noqa pylint: disable=line-too-long
      return env_dict
docs: Join paths in environment dict down to strings.