code: def get_features(line):
      feat = line[2:]
      # Bucketizing the integer features on a logarithmic scale
      for i in range(8):
          if feat[i]:
              v = int(feat[i])
              if v > 0:
                  feat[i] = str(int(log(v + 0.5) / log(1.5)))
      return " ".join(
          ["%d_%s" % (i, v) for i, v in enumerate(feat) if v]
      )
  
imports: import sys
  from subprocess import call, Popen, PIPE
  from math import log, exp
  from os import devnull
label_desc: Use image node_id 1 for calling a global function with example usage: get_features(line) and returns: str