code: def trim(self, name):
      
      if len(name) > self.MAX_LENGTH and self.target:
        name = self.TEMP_VAR.format(self._name(self.target))
      if len(name) > self.MAX_LENGTH:
        while True:
          name = '_{:04x}'.format(random.randint(0, 16 ** 4 - 1))
          if name not in self.names:
            break
      return name
docs: When the name is too long, use the LHS or a random string instead.