<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_cwl(cls, data, __reference__=None):
 """Return an instance from CWL data."""

        class_name = data.get('class', None)
        cls = cls.registry.get(class_name, cls)

        if __reference__:
            with with_reference(__reference__):
                self = cls(
                    **{k: v
                       for k, v in iteritems(data) if k != 'class'}
                )
        else:
            self = cls(**{k: v for k, v in iteritems(data) if k != 'class'})
        return self