code: def is_document_pdf_column(
      data: pd.Series,
      col_name: str,
      sample_m: Optional[int] = 500,
  ) -> bool:
      """
      Identify if a column is a pdf document column.
  
      Parameters
      ----------
      data
          One column of a multimodal pd.DataFrame for training.
      col_name
          Name of column.
      sample_m
          Number of sample images used to check if images are documents images.
  
      Returns
      -------
      Whether the column is a pdf document column.
      """
  
      if len(data) > sample_m:
          # Sample to speed-up type inference
          data = data.sample(n=sample_m, random_state=0)
  
      for docs in data:
          try:
              if not isinstance(docs, list):
                  docs = [docs]
              for per_doc in docs:
                  # If there is non-pdf document, return False
                  if not per_doc.endswith(".pdf"):
                      return False
          except:
              return False
  
      return True
  
imports: import collections
  import json
  import logging
  import warnings
  from io import BytesIO
  from typing import Dict, List, Optional, Tuple, Union
  import pandas
  import PIL
  import pytesseract
  from autogluon.core.utils import infer_problem_type
  from ..constants import BINARY, CATEGORICAL, CLASSIFICATION, DOCUMENT_IMAGE, DOCUMENT_PDF, IDENTIFIER, IMAGE, IMAGE_BYTEARRAY, IMAGE_PATH, MULTICLASS, NER, NER_ANNOTATION, NULL, NUMERICAL, OBJECT_DETECTION, OPEN_VOCABULARY_OBJECT_DETECTION, REGRESSION, ROIS, SEMANTIC_SEGMENTATION, SEMANTIC_SEGMENTATION_GT, SEMANTIC_SEGMENTATION_IMG, TEXT, TEXT_NER
  from .utils import is_rois_input
label_desc: Use image node_id 5 for calling a global function with example usage: is_document_pdf_column(data, col_name, sample_m) and returns: True, False, False