code: def fmt_margin(text, margin = None, margin_left = None, margin_right = None, margin_char = ' '):
          
          if margin_left is None:
              margin_left = margin
          if margin_right is None:
              margin_right = margin
          if margin_left is not None:
              text = '{}{}'.format(str(margin_char)[0] * int(margin_left), text)
          if margin_right is not None:
              text = '{}{}'.format(text, str(margin_char)[0] * int(margin_right))
          return text
docs: Surround given text with given margin characters.