docstr: Convert ``protection_dict`` to an openpyxl v2 Protection object.
  
  Parameters
  ----------
  protection_dict : dict
      A dict with zero or more of the following keys.
          'locked'
          'hidden'
  
  Returns
  -------
docstr_tok: ["Convert","``","protection_dict","``","to","an","openpyxl","v2","Protection","object",".","Parameters","--","--","--","--","--","protection_dict",":","dict","A","dict","with","zero","or","more","of","the","following","keys",".","'locked'","'hidden'","Returns","--","--","--","-"]
code: def _convert_to_protection(cls, protection_dict):
      """
      Convert ``protection_dict`` to an openpyxl v2 Protection object.
  
      Parameters
      ----------
      protection_dict : dict
          A dict with zero or more of the following keys.
              'locked'
              'hidden'
  
      Returns
      -------
      """
      from openpyxl.styles import Protection
  
      return Protection(**protection_dict)
  
imports: from __future__ import annotations
  import mmap
  from typing import TYPE_CHECKING, Any, Tuple, cast
  import numpy
  from pandas._typing import FilePath, ReadBuffer, Scalar, StorageOptions, WriteExcelBuffer
  from pandas.compat._optional import import_optional_dependency
  from pandas.util._decorators import doc
  from pandas.core.shared_docs import _shared_docs
  from pandas.io.excel._base import BaseExcelReader, ExcelWriter
  from pandas.io.excel._util import combine_kwargs, validate_freeze_panes
label_desc: Use image node_id 14 for calling the OpenpyxlWriter obj's underlying member method code with example usage: obj._convert_to_protection(cls, protection_dict) and returns: Protection