def METHOD_NAME(
    model_card: Optional[Model] = None,
    metadata: Optional[dict] = None,
    minimal_metadata_path: Optional[str] = None,
    binary_file: Optional[str] = None,
    code_file: Optional[str] = None,
):
    """Validate the model and files provided for upload
    Args:
        model_card: Model card of the model to update. Defaults to None.
        metadata: Metadata required for uploading a new model. Must
                                   match the minimal metadata. Defaults to None.
        minimal_metadata_path: something
        binary_file: File path to model binary. Defaults to None.
        code_file: File path to model code. Defaults to None.
    Raises:
        DataInvalid: Invalid model
        DataInvalid: Binary or code file does not exist
        InvalidMetadata: Metadata does not meet the minimal metadata
    """
    if model_card:
        validate_model_card(model_card)
    if metadata:
        validate_metadata(metadata, minimal_metadata_path)
    if binary_file and code_file:
        validate_file_paths(binary_file, code_file)