code: def yesterday(hour=None, minute=None):
      
      if hour is None:
          hour = datetime.now().hour
      if minute is None:
          minute = datetime.now().minute
      yesterday_date = date.today() + timedelta(days=-1)
      return datetime(yesterday_date.year, yesterday_date.month,
                      yesterday_date.day, hour, minute, 0)
docs: Gives the ``datetime.datetime`` object corresponding to yesterday. The
      default value for optional parameters is the current value of hour and
      minute. I.e: when called without specifying values for parameters, the
      resulting object will refer to the time = now - 24 hours; when called with
      only hour specified, the resulting object will refer to yesterday at the
      specified hour and at the current minute.
  
      :param hour: the hour for yesterday, in the format *0-23* (defaults to
          ``None``)
      :type hour: int
      :param minute: the minute for yesterday, in the format *0-59* (defaults to
          ``None``)
      :type minute: int
      :returns: a ``datetime.datetime`` object
      :raises: *ValueError* when hour or minute have bad values