code: def _force_float(v):
      
      try:
          return float(v)
      except Exception as exc:
          return float('nan')
          logger.warning('Failed to convert {} to float with {} error. Using 0 instead.'.format(v, exc))
docs: Converts given argument to float. On fail logs warning and returns 0.0.
  
      Args:
          v (any): value to convert to float
  
      Returns:
          float: converted v or 0.0 if conversion failed.