def _GetRelativePathOfChrootPath(chroot_path):
  """Gets the relative path of the chroot path passed in.

  Args:
    chroot_path: The chroot path to get its relative path.

  Returns:
    The relative path after '/mnt/host/source/'.

  Raises:
    ValueError: The prefix of 'chroot_path' did not match '/mnt/host/source/'.
  """

  chroot_prefix = '/mnt/host/source/'

  if not chroot_path.startswith(chroot_prefix):
    raise ValueError('Invalid prefix for the chroot path: %s' % chroot_path)

  return chroot_path[len(chroot_prefix):]