code: def ResolvePath(self, path, expand_variables=True):
      
      location, path_spec = self._ResolvePath(
          path, expand_variables=expand_variables)
  
      if not location or not path_spec:
        return None
  
      # Note that we don't want to set the keyword arguments when not used because
      # the path specification base class will check for unused keyword arguments
      # and raise.
      kwargs = path_spec_factory.Factory.GetProperties(path_spec)
  
      kwargs['location'] = location
      if not path_spec_factory.Factory.IsSystemLevelTypeIndicator(
          self._file_system.type_indicator):
        kwargs['parent'] = self._mount_point
  
      return path_spec_factory.Factory.NewPathSpec(
          self._file_system.type_indicator, **kwargs)
docs: Resolves a Windows path in file system specific format.
  
      Args:
        path (str): Windows path to resolve.
        expand_variables (Optional[bool]): True if path variables should be
            expanded or not.
  
      Returns:
        PathSpec: path specification in file system specific format.