@classmethod
def get_unpack_filter(cls, unpackable_target):
    """Calculate a filter function from the include/exclude patterns of a Target.

        :param ImportRemoteSourcesMixin unpackable_target: A target with include_patterns and
                                                           exclude_patterns attributes.
        """
    return cls._calculate_unpack_filter(includes=unpackable_target.payload.
        include_patterns, excludes=unpackable_target.payload.
        exclude_patterns, spec=unpackable_target.address.spec)
