parameters: (target_ratio: float,
                             total_target_ratio: float,
                             total_target_bytes: int,
                             capacity: int)
return_statement: return target_ratio
docstring: Returns the target ratio after normalizing for ratios across pools and
      adjusting for capacity reserved by pools that have target_size_bytes set.
docstring_summary: Returns the target ratio after normalizing for ratios across pools and
      adjusting for capacity reserved by pools that have target_size_bytes set.
docstring_tokens: Returns the target ratio after normalizing for ratios across pools and adjusting for capacity reserved by pools that have target_size_bytes set .
function: def effective_target_ratio(target_ratio: float,
                             total_target_ratio: float,
                             total_target_bytes: int,
                             capacity: int) -> float:
      """
      Returns the target ratio after normalizing for ratios across pools and
      adjusting for capacity reserved by pools that have target_size_bytes set.
      """
      target_ratio = float(target_ratio)
      if total_target_ratio:
          target_ratio = target_ratio / total_target_ratio
  
      if total_target_bytes and capacity:
          fraction_available = 1.0 - min(1.0, float(total_target_bytes) / capacity)
          target_ratio *= fraction_available
  
      return target_ratio
function_tokens: def effective_target_ratio ( target_ratio : float , total_target_ratio : float , total_target_bytes : int , capacity : int ) -> float : target_ratio = float ( target_ratio ) if total_target_ratio : target_ratio = target_ratio / total_target_ratio if total_target_bytes and capacity : fraction_available = 1.0 - min ( 1.0 , float ( total_target_bytes ) / capacity ) target_ratio *= fraction_available return target_ratio