code: def CopyToPath(self):
      
      number_of_path_segments = len(self._path_segments)
      if number_of_path_segments == 0:
        return None
  
      strings = [self._path_segments[0]]
      number_of_path_segments -= 1
      for path_segment in self._path_segments[1:]:
        # Remove a trailing \ except for the last path segment.
        if path_segment.endswith('\\') and number_of_path_segments > 1:
          path_segment = path_segment[:-1]
  
        if ((path_segment.startswith('<') and path_segment.endswith('>')) or
            len(strings) == 1):
          strings.append(' {0:s}'.format(path_segment))
        elif path_segment.startswith('\\'):
          strings.append('{0:s}'.format(path_segment))
        else:
          strings.append('\\{0:s}'.format(path_segment))
        number_of_path_segments -= 1
  
      return ''.join(strings)
docs: Copies the shell items to a path.
  
      Returns:
        str: converted shell item list path or None.