<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_stream_url(self, session_id, stream_id=None):
 """ this method returns the url to get streams information """

        url = self.api_url + '/v2/project/' + self.api_key + '/session/' + session_id + '/stream'
        if stream_id:
            url = url + '/' + stream_id
        return url