code: func (p *Project) RemoveOrphans(ctx context.Context, projectName string, serviceConfigs *config.ServiceConfigs) error {
  	client := p.clientFactory.Create(nil)
  	filter := filters.NewArgs()
  	filter.Add("label", labels.PROJECT.EqString(projectName))
  	containers, err := client.ContainerList(ctx, types.ContainerListOptions{
  		Filters: filter,
  	})
  	if err != nil {
  		return err
  	}
  	currentServices := map[string]struct{}{}
  	for _, serviceName := range serviceConfigs.Keys() {
  		currentServices[serviceName] = struct{}{}
  	}
  	for _, container := range containers {
  		serviceLabel := container.Labels[labels.SERVICE.Str()]
  		if _, ok := currentServices[serviceLabel]; !ok {
  			if err := client.ContainerKill(ctx, container.ID, "SIGKILL"); err != nil {
  				return err
  			}
  			if err := client.ContainerRemove(ctx, container.ID, types.ContainerRemoveOptions{
  				Force: true,
  			}); err != nil {
  				return err
  			}
  		}
  	}
  	return nil
  }
docs: // RemoveOrphans implements project.RuntimeProject.RemoveOrphans.
  // It will remove orphan containers that are part of the project but not to any services.