class_docstr: Draw space around content.
  
  Example:
      >>> print(Padding("Hello", (2, 4), style="on blue"))
  
  Args:
      renderable (RenderableType): String or other renderable.
      pad (Union[int, Tuple[int]]): Padding for top, right, bottom, and left borders.
          May be specified with 1, 2, or 4 integers (CSS style).
      style (Union[str, Style], optional): Style for padding characters. Defaults to "none".
      expand (bool, optional): Expand padding to fit available width. Defaults to True.
class_docstr_tok: ["Draw","space","around","content",".","Example",":",">",">",">","print","(","Padding","(","``","Hello","''",",","(","2",",","4",")",",","style=","''","on","blue","''",")",")","Args",":","renderable","(","RenderableType",")",":","String","or","other","renderable",".","pad","(","Union","[","int",",","Tuple","[","int","]","]",")",":","Padding","for","top",",","right",",","bottom",",","and","left","borders",".","May","be","specified","with","1",",","2",",","or","4","integers","(","CSS","style",")",".","style","(","Union","[","str",",","Style","]",",","optional",")",":","Style","for","padding","characters",".","Defaults","to","``","none","''",".","expand","(","bool",",","optional",")",":","Expand","padding","to","fit","available","width",".","Defaults","to","True","."]
docstr: Unpack padding specified in CSS style.
docstr_tok: ["Unpack","padding","specified","in","CSS","style","."]
code: def unpack(pad: "PaddingDimensions") -> Tuple[int, int, int, int]:
      """Unpack padding specified in CSS style."""
      if isinstance(pad, int):
          return (pad, pad, pad, pad)
      if len(pad) == 1:
          _pad = pad[0]
          return (_pad, _pad, _pad, _pad)
      if len(pad) == 2:
          pad_top, pad_right = cast(Tuple[int, int], pad)
          return (pad_top, pad_right, pad_top, pad_right)
      if len(pad) == 4:
          top, right, bottom, left = cast(
              Tuple[int, int, int, int], pad
          )
          return (top, right, bottom, left)
      raise ValueError(
          f"1, 2 or 4 integers required for padding; {len(pad)} given"
      )
  
file_path: rich/rich/padding.py
imports: from typing import cast, List, Optional, Tuple, TYPE_CHECKING, Union
  from .jupyter import JupyterMixin
  from .measure import Measurement
  from .style import Style
  from .segment import Segment
label_desc: Use image node_id 3 for calling the Padding obj's underlying member method code with example usage: obj.unpack(pad) and returns: pad,  pad,  pad,  pad, _pad,  _pad,  _pad,  _pad, pad_top,  pad_right,  pad_top,  pad_right, top,  right,  bottom,  left