class_docstr_tok: []
docstr: Return the secret_key, converted to bytes and cached.
  
          
docstr_tok: ["Return","the","secret_key",",","converted","to","bytes","and","cached","."]
code: def secret_key_bytes(self) -> bytes | None:
      """Return the secret_key, converted to bytes and cached."""
      if not hasattr(self, "_secret_key_bytes"):
          key = self.secret_key()
          if key is None:
              self._secret_key_bytes = None
          else:
              self._secret_key_bytes = key.encode("utf-8")
      return self._secret_key_bytes
  
imports: from __future__ import annotations
  import logging
  import os
  from os.path import join
  from pathlib import Path
  from typing import TYPE_CHECKING, Any, Callable, Generic, Literal, Sequence, TypeVar, Union, cast
  import yaml
  from .util.deprecation import deprecated
  from .util.paths import bokehjs_path, server_path
label_desc: Use image node_id 11 for calling the Settings obj's underlying member method code with example usage: obj.secret_key_bytes() and returns: self