code: def bytes_hash(byts, typ):
      hasher = getattr(hashlib, typ)()
      hasher.update(byts)
      return hasher.hexdigest()
  
imports: import hashlib
  import json
  import os
  import re
  import sys
  from typing import TYPE_CHECKING, Dict, Iterable, Iterator, List, Optional, Tuple
  import colorama
label_desc: Use image node_id 1 for calling a global function with example usage: bytes_hash(byts, typ) and returns: hasher