code: private List<Deployment> managedDeployments(List<Deployment> deployments) {
          List<Deployment> managed = new ArrayList<Deployment>();
          for (Deployment deployment : deployments) {
              if (deployment.getDescription().managed()) {
                  managed.add(deployment);
              }
          }
          return managed;
      }
docs: Filters the List of Deployments and returns the ones that are Managed deployments.
  
  @param deployments
  List to filter
  
  @return Filtered list