'If HDA is accessible, return information about whether it could
match this parameter and if so how. See valid_hda_match for more
information.'

def hda_match(self, hda, check_implicit_conversions=True, check_security=True, ensure_visible=True):

    accessible = self.hda_accessible(hda, check_security=check_security)
    if (accessible and ((not ensure_visible) or hda.visible or (self.selected(hda) and (not hda.implicitly_converted_parent_datasets)))):
        require_public = (self.tool and (self.tool.tool_type == 'data_destination'))
        if (require_public and (not self.trans.app.security_agent.dataset_is_public(hda.dataset))):
            return False
        if self.filter(hda):
            return False
        return self.valid_hda_match(hda, check_implicit_conversions=check_implicit_conversions)
