<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fromDataset(datatype, value, metadata=None, tmap=None):
 """ Return a representation of dataset argument as an instance of the class corresponding to its datatype """

        if tmap is None:
            tmap = typemap
        return tmap[datatype.upper()].fromDataset(value, metadata=metadata)