<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def decode(bstr):
 """ Decodes an ASCII encoded binary MAC address tring into a number. """


  bstr = bstr.replace(b':', b'')
  if len(bstr) != 12:
    raise ValueError('not a valid MAC address: {!r}'.format(bstr))

  try:
    return int(bstr, 16)
  except ValueError:
    raise ValueError('not a valid MAC address: {!r}'.format(bstr))