input: Write a function named `build_digit_recognition_model` that constructs a neural network model for recognizing handwritten digits from 0 to 9 using the MNIST dataset. The function should return the compiled model. The model should include an input layer, a hidden layer with 64 units and a ReLU activation function, a dropout layer with a rate of 0.5, and an output layer with a softmax activation function. The model should be compiled using categorical cross-entropy loss, the Adam optimizer, and accuracy as the metric. Ensure that the input data is reshaped and normalized, and the labels are one-hot encoded before fitting the model. The function should also preprocess the MNIST data, including reshaping and normalization.
  
  assert build_digit_recognition_model().summary().startswith('Model: "model"')
  assert build_digit_recognition_model().layers[0].name == 'input_1'
  assert build_digit_recognition_model().layers[1].units == 64
  assert build_digit_recognition_model().layers[2].rate == 0.5
  assert build_digit_recognition_model().layers[3].units == 10
  assert build_digit_recognition_model().optimizer.get_config()['name'] == 'Adam'
  assert build_digit_recognition_model().loss == 'categorical_crossentropy'
output: def build_digit_recognition_model():
      from tensorflow.keras.models import Sequential
      from tensorflow.keras.layers import Dense, Dropout, Flatten
      from tensorflow.keras.optimizers import Adam
      from tensorflow.keras.datasets import mnist
      from tensorflow.keras.utils import to_categorical
  
      (x_train, y_train), (x_test, y_test) = mnist.load_data()
      x_train = x_train.reshape(-1, 28*28).astype('float32') / 255
      x_test = x_test.reshape(-1, 28*28).astype('float32') / 255
      y_train = to_categorical(y_train, 10)
      y_test = to_categorical(y_test, 10)
  
      model = Sequential()
      model.add(Dense(64, activation='relu', input_shape=(28*28,)))
      model.add(Dropout(0.5))
      model.add(Dense(10, activation='softmax'))
      model.compile(loss='categorical_crossentropy', optimizer=Adam(), metrics=['accuracy'])
      return model