class_docstr: _AppManager implements API calls specific to Lightning AI BYOC apps.
code: def list_apps(
      self, limit: int = 100, phase_in: Optional[List[str]] = None
  ) -> List[Externalv1LightningappInstance]:
      phase_in = phase_in or []
      project = _get_project(self.api_client)
  
      kwargs = {
          "project_id": project.project_id,
          "limit": limit,
          "phase_in": phase_in,
      }
  
      resp = self.api_client.lightningapp_instance_service_list_lightningapp_instances(
          **kwargs
      )
      apps = resp.lightningapps
      while (
          resp.next_page_token is not None
          and resp.next_page_token != ""
      ):
          kwargs["page_token"] = resp.next_page_token
          resp = self.api_client.lightningapp_instance_service_list_lightningapp_instances(
              **kwargs
          )
          apps = apps + resp.lightningapps
      return apps
  
imports: import json
  from datetime import datetime
  from typing import List, Optional
  from lightning_cloud.openapi import Externalv1LightningappInstance, Externalv1Lightningwork, V1LightningappInstanceState, V1LightningappInstanceStatus
  from rich.console import Console
  from rich.table import Table
  from rich.text import Text
  from lightning.app.cli.core import Formatable
  from lightning.app.utilities.cloud import _get_project
  from lightning.app.utilities.network import LightningClient
label_desc: Use image node_id 3 for calling the _AppManager obj's underlying member method code with example usage: obj.list_apps(limit, phase_in) and returns: apps