code: def get_bytes(s):
      
      if isinstance(s, bytes):
          b = s
      elif isinstance(s, str):
          b = bytes.fromhex(s)
      else:
          raise TypeError("s must be either 'bytes' or 'str'!")
  
      return b
docs: Returns the byte representation of a hex- or byte-string.