code: def create_like_strategy(
      mesh: DeviceMesh, op_schema: OpSchema
  ) -> StrategyType:
      # create_like_strategy deals with ops that creating tensors with same
      # shape as input, but with specific content that does not depend on
      # the input, we can propagate sharding, but we have to make sure we
      # move from partial to replicated.
      select_strategy = op_schema.args_schema[0]
      create_like_strategy = OpStrategy([])
      assert isinstance(select_strategy, OpStrategy)
      for arg_strategy in select_strategy.strategies:
          arg_spec = arg_strategy.out_spec
          if is_tensor_partial(arg_spec):
              # if the arg_spec have partial, accept partial
              # in the input_specs but output replicate for
              # those corresponding mesh dims
              output_spec = DTensorSpec(
                  mesh=arg_spec.mesh,
                  placements=tuple(
                      Replicate() if isinstance(p, _Partial) else p
                      for p in arg_spec.placements
                  ),
              )
              create_like_strategy.strategies.append(
                  PlacementStrategy(
                      output_spec=output_spec, input_specs=(arg_spec,)
                  )
              )
  
          else:
              create_like_strategy.strategies.append(
                  PlacementStrategy(arg_spec)
              )
  
      return create_like_strategy
  
imports: from typing import cast, List, Optional, Sequence, Tuple
  import torch
  from torch.distributed._tensor._utils import compute_local_shape
  from torch.distributed._tensor.op_schema import OpSchema, OpStrategy, OutputSharding, PlacementStrategy, RuntimeSchemaInfo, StrategyType
  from torch.distributed._tensor.ops.common_rules import pointwise_rule
  from torch.distributed._tensor.ops.utils import is_tensor_dim_sharded, is_tensor_partial, normalize_dim, prod, register_op_strategy, register_prop_rule
  from torch.distributed._tensor.placement_types import _Partial, DTensorSpec, Placement, Replicate, Shard
  from torch.distributed.device_mesh import DeviceMesh
label_desc: Use image node_id 3 for calling a global function with example usage: create_like_strategy(mesh, op_schema) and returns: create_like_strategy