def _create_credential_with_user_id(self, user_id=None):
    if (not user_id):
        user_id = uuid.uuid4().hex
    credential = unit.new_credential_ref(user_id=user_id, extra=uuid.uuid4().hex, type=uuid.uuid4().hex)
    PROVIDERS.credential_api.create_credential(credential['id'], credential)
    return credential
def _create_credential_with_user_id(self, user_id=None):
    if (not user_id):
        user_id = uuid.uuid4().hex
    credential = unit.new_credential_ref(user_id=user_id, extra=uuid.uuid4().hex, type=uuid.uuid4().hex)
    PROVIDERS.credential_api.create_credential(credential['id'], credential)
    return credential