'Utility class method to instantiate a MediaUpload subclass from a JSON
representation produced by to_json().
Args:
s: string, JSON from to_json().
Returns:
An instance of the subclass of MediaUpload that was serialized with
to_json().'

@classmethod
def new_from_json(cls, s):

    data = json.loads(s)
    module = data['_module']
    m = __import__(module, fromlist=module.split('.')[:(-1)])
    kls = getattr(m, data['_class'])
    from_json = getattr(kls, 'from_json')
    return from_json(s)
