<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getDatastreamProfile(self, dsid, date=None):
 """Get information about a particular datastream belonging to this object. :param dsid: datastream id :rtype: :class:`DatastreamProfile` """

        # NOTE: used by DatastreamObject
        if self._create:
            return None

        r = self.api.getDatastream(self.pid, dsid, asOfDateTime=date)
        return parse_xml_object(DatastreamProfile, r.content, r.url)