<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def evaluate_model_predictions(y_true, y_pred, weights=None):
 """ Evaluate the performance of an extractor model's binary classification predictions, typically at the block level, of whether a block is content or not. Args: y_true (``np.ndarray``) y_pred (``np.ndarray``) weights (``np.ndarray``) Returns: Dict[str, float] """

    if isinstance(y_pred[0], np.ndarray):
        y_pred = np.concatenate(y_pred)
    if isinstance(y_true[0], np.ndarray):
        y_true = np.concatenate(y_true)
    if (weights is not None) and (isinstance(weights[0], np.ndarray)):
        weights = np.concatenate(weights)

    accuracy = accuracy_score(
        y_true, y_pred, normalize=True, sample_weight=weights)
    precision = precision_score(
        y_true, y_pred, average='binary', pos_label=1, sample_weight=weights)
    recall = recall_score(
        y_true, y_pred, average='binary', pos_label=1, sample_weight=weights)
    f1 = f1_score(
        y_true, y_pred, average='binary', pos_label=1, sample_weight=weights)
    return {'accuracy': accuracy, 'precision': precision, 'recall': recall, 'f1': f1}