code: def sanitize_name(field_name):
      
      if not field_name:
          return field_name
  
      # Sanitize field name for TSDB (Graphite or Influx):
      sanitized = field_name.strip()
      if sanitized.startswith('/'):
          sanitized = '_' + sanitized[1:]
      # + becomes a _
      sanitized = sanitized.replace("+", "_")
      # / becomes a -
      sanitized = sanitized.replace("/", "-")
      # space becomes a _
      sanitized = sanitized.replace(" ", "_")
      # % becomes _pct
      sanitized = sanitized.replace("%", "_pct")
      # all character not in [a-zA-Z_-0-9.] is removed
      sanitized = re.sub(r'[^a-zA-Z_\-0-9\.\$]', '', sanitized)
  
      return sanitized
docs: Sanitize a field name for a TSDB (Graphite or Influx)
      - remove not allowed characters from the field name
      and replace with authorized characters
  
      :param field_name: Field name to clean
      :type field_name: string
      :return: sanitized field name