code: def _sharding_option_score(
      sharding_option: ShardingOption, use_depth: bool = True
  ) -> float:
      return (
          max(
              [
                  cast(Perf, shard.perf).total
                  for shard in sharding_option.shards
              ]
          )
          if use_depth
          else sum(
              [
                  cast(Perf, shard.perf).total
                  for shard in sharding_option.shards
              ]
          )
      )
  
imports: import copy
  import itertools
  import logging
  from decimal import Decimal
  from typing import cast, Dict, List, Optional, Set, Tuple, Union
  import torch
  from torchrec.distributed.embedding_types import EmbeddingComputeKernel
  from torchrec.distributed.planner.types import Enumerator, Perf, Proposer, ShardingOption, Topology
  from torchrec.distributed.planner.utils import BinarySearchPredicate, bytes_to_gb, prod
label_desc: Use image node_id 1 for calling a global function with example usage: _sharding_option_score(sharding_option, use_depth) and returns: unknown