class_docstr: Contains the compute environment. If not passed, will try to detect.
  
  Args:
      dist_env: The distributed environment (distributed worldsize and global rank)
      worker_env: The worker environment (number of workers, worker rank)
class_docstr_tok: ["Contains","the","compute","environment",".","If","not","passed",",","will","try","to","detect",".","Args",":","dist_env",":","The","distributed","environment","(","distributed","worldsize","and","global","rank",")","worker_env",":","The","worker","environment","(","number","of","workers",",","worker","rank",")"]
code: def __init__(
      self,
      dist_env: Optional[_DistributedEnv],
      worker_env: Optional[_WorkerEnv],
  ):
      self.worker_env = worker_env
      self.dist_env = dist_env
  
file_path: pytorch-lightning/src/lightning/data/utilities/env.py
imports: from typing import Callable, Optional
  import torch
  from torch.utils.data import get_worker_info
label_desc: Use image node_id 1 to create a new Environment object  with example: obj = Environment(dist_env, worker_env)