def returned_type(feature, _class):
    """
        Returns the type of the feature.

        There is a difference between attribute and method.
        Attributes has "type" attribute and
        method has "return_type" attribute.
    """
    try:
        # For Attribute
        _type = feature.type
    except AttributeError:
        # For Method
        _type = feature.return_type

    if _type == 'SELF_TYPE':
        _type = _class.name

    return _type