<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def stream_name(stream_id):
 """Map a stream id to a human readable name. The mapping process is as follows: If the stream id is globally known, its global name is used as <name> otherwise a string representation of the stream is used as <name>. In both cases the hex representation of the stream id is appended as a number: <name> (0x<stream id in hex>) Args: stream_id (int):
 An integer stream id. Returns: str: The nice name of the stream. """


    name = _STREAM_NAME_MAP.get(stream_id)
    if name is None:
        name = str(DataStream.FromEncoded(stream_id))

    return "{} (0x{:04X})".format(name, stream_id)