@staticmethod
    def get_target_dm(target_form_dm, case_type, module):
        """Find the datum from the target form with the specified case type.
        """
        try:
            [target_dm] = [
                target_meta for target_meta in target_form_dm
                if getattr(target_meta, 'case_type', None) == case_type
            ]
        except __HOLE__:
            # This error is raised when we can't find a datum that matches the case type we're looking for among
            # the list of datums that are common between all the forms in the module which implies that not all
            # the forms have the same case management configuration.
            raise SuiteValidationError(
                u"The '{}' module is not properly configured to have a Case List Registration Form. All forms"
                u" in the module should have the same case management configuration.".format(module.default_name())
            )
        return target_dm
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/app_manager/suite_xml/post_process/workflow.py/CaseListFormWorkflow.get_target_dm