<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load(fp: Union[TextIO, str], load_module: types.ModuleType, **kwargs):
 """ Convert a file name or file-like object containing stringified JSON into a JSGObject :param fp: file-like object to deserialize :param load_module: module that contains declarations for types :param kwargs: arguments see: json.load for details :return: JSGObject representing the json string """

    if isinstance(fp, str):
        with open(fp) as f:
            return loads(f.read(), load_module, **kwargs)
    else:
        return loads(fp.read(), load_module, **kwargs)