code: def deposit_portfolio(p, cash, tdate):
      r"""Deposit cash into a given portfolio.
  
      Parameters
      ----------
      p : alphapy.Portfolio
          Portfolio to accept the deposit.
      cash : float
          Cash amount to deposit.
      tdate : datetime
          The date of deposit.
  
      Returns
      -------
      p : alphapy.Portfolio
          Portfolio with the added cash.
  
      """
      p.cash = p.cash + cash
      p = valuate_portfolio(p, tdate)
      return p
  
imports: from alphapy.frame import Frame
  from alphapy.frame import frame_name
  from alphapy.frame import read_frame
  from alphapy.frame import write_frame
  from alphapy.globals import MULTIPLIERS, SSEP
  from alphapy.globals import Orders
  from alphapy.space import Space
  import logging
  import math
  import numpy
  from pandas import DataFrame
  from pandas import date_range
  from pandas import Series
label_desc: Use image node_id 7 for calling a global function with example usage: deposit_portfolio(p, cash, tdate) and returns: p