code: def _loc_scale_reparam(name, fn, centered):
      if "_decentered" in name:
          return  # Avoid infinite recursion.
  
      # Check for location-scale families.
      params = set(fn.arg_constraints)
      if not {"loc", "scale"}.issubset(params):
          return
  
      # Check for unconstrained support.
      if not _is_unconstrained(fn.support):
          return
  
      # TODO reparametrize only if parameters are variable. We might guess
      # based on whether parameters are differentiable, .requires_grad. See
      # https://github.com/pyro-ppl/pyro/pull/2824
  
      # Create an elementwise-learnable reparametrizer.
      shape_params = sorted(params - {"loc", "scale"})
      return LocScaleReparam(
          centered=centered, shape_params=shape_params
      )
  
imports: from abc import ABC, abstractmethod
  from typing import Callable, Dict, Optional, Union
  import torch
  from torch.distributions import constraints
  import pyro.distributions
  import pyro.poutine
  from .loc_scale import LocScaleReparam
  from .projected_normal import ProjectedNormalReparam
  from .reparam import Reparam
  from .softmax import GumbelSoftmaxReparam
  from .stable import LatentStableReparam, StableReparam, SymmetricStableReparam
  from .transform import TransformReparam
label_desc: Use image node_id 2 for calling a global function with example usage: _loc_scale_reparam(name, fn, centered) and returns: LocScaleReparam