code: def __init__(self, wandb_credentials: Optional[Dict[str, str]]):
      """
      Initialize the wandb_run if wandb_credentials are provided.
  
      Parameters
      ----------
      wandb_credentials : Optional[Dict[str, str]]
          A dictionary containing the W&B entity and project names that will be
          used to initialize the wandb run. If ``None``, logging to W&B will not be performed.
      """
      self.wandb_run = None
      if wandb_credentials:
          self.wandb_run = wandb.init(
              project=wandb_credentials["wandb_project"],
              entity=wandb_credentials["wandb_entity"],
          )
  
imports: from typing import Any, Dict, Optional
  import wandb
label_desc: Use image node_id 1 to create a new WandbLogger object  with example: obj = WandbLogger(wandb_credentials)