input: Write a python function to convert a number from one base to another.
  assert convert_number('1010', 2, 10) == '10'
  assert convert_number('10', 10, 2) == '1010'
  assert convert_number('7B', 16, 10) == '123'
  assert convert_number('123', 10, 16) == '7B'
output: def convert_number(number: str, from_base: int, to_base: int) -> str:
      # Convert the number from the given base to an integer
      decimal_number = int(number, from_base)
      
      # Convert the integer to the target base
      if to_base == 10:
          return str(decimal_number)
      
      # For bases other than 10
      digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
      result = ""
      
      while decimal_number > 0:
          result = digits[decimal_number % to_base] + result
          decimal_number //= to_base
      
      return result or "0"