(resource)
return None
If ``resource`` has a CommCare case ID identifier, return its value,
    otherwise return None.
If ``resource`` has a CommCare case ID identifier, return its value,
    otherwise return None.
If resource has a CommCare case ID identifier return its value otherwise return None .
def get_case_id_or_none(resource):
    """
    If ``resource`` has a CommCare case ID identifier, return its value,
    otherwise return None.
    """
    if 'identifier' in resource:
        case_id_identifier = [id_ for id_ in resource['identifier']
                              if id_.get('system') == SYSTEM_URI_CASE_ID]
        if case_id_identifier:
            return case_id_identifier[0]['value']
    return None
def get_case_id_or_none ( resource ) : if 'identifier' in resource : case_id_identifier = [ id_ for id_ in resource [ 'identifier' ] if id_ . get ( 'system' ) == SYSTEM_URI_CASE_ID ] if case_id_identifier : return case_id_identifier [ 0 ] [ 'value' ] return None