code: def justify(clr, argd):
      
      methodmap = {
          '--ljust': clr.ljust,
          '--rjust': clr.rjust,
          '--center': clr.center,
      }
      for flag in methodmap:
          if argd[flag]:
              if argd[flag] in ('0', '-'):
                  val = get_terminal_size(default=(80, 35))[0]
              else:
                  val = try_int(argd[flag], minimum=None)
                  if val < 0:
                      # Negative value, subtract from terminal width.
                      val = get_terminal_size(default=(80, 35))[0] + val
              return methodmap[flag](val)
  
      # No justify args given.
      return clr
docs: Justify str/Colr based on user args.