code: def unit(key: str) -> str:
      """
      Unit in physical_constants indexed by key
  
      Parameters
      ----------
      key : Python string
          Key in dictionary `physical_constants`
  
      Returns
      -------
      unit : Python string
          Unit in `physical_constants` corresponding to `key`
  
      Examples
      --------
      >>> from scipy import constants
      >>> constants.unit('proton mass')
      'kg'
  
      """
      _check_obsolete(key)
      return physical_constants[key][1]
  
file_path: scipy/scipy/constants/_codata.py
imports: from __future__ import annotations
  import warnings
  from typing import Any
label_desc: Use image node_id 5 for calling a global function with example usage: unit(key) and returns: physical_constants