code: def from_env(cls) -> "MetricsConfig":
      env = Env(expand_vars=True)
      with env.prefixed("METRICS_"):
          return cls(
              mongo_database=env.str(
                  name="MONGO_DATABASE", default=METRICS_MONGO_DATABASE
              ),
              mongo_url=env.str(
                  name="MONGO_URL", default=METRICS_MONGO_URL
              ),
          )
  
file_path: datasets-server/jobs/mongodb_migration/src/mongodb_migration/config.py
imports: from dataclasses import dataclass, field
  from environs import Env
  from libcommon.config import CacheConfig, LogConfig, QueueConfig
label_desc: Use image node_id 1 for calling the MetricsConfig obj's underlying member method code with example usage: obj.from_env(cls) and returns: cls