def get_obj(app_label, model_name, object_id):
try:<EOL><INDENT>model = apps.get_model("<STR_LIT>".format(app_label, model_name))<EOL>assert is_valid_django_model(model), ("<STR_LIT>").format(<EOL>app_label, model_name<EOL>)<EOL>obj = get_Object_or_None(model, pk=object_id)<EOL>return obj<EOL><DEDENT>except model.DoesNotExist:<EOL><INDENT>return None<EOL><DEDENT>except LookupError:<EOL><INDENT>pass<EOL><DEDENT>except ValidationError as e:<EOL><INDENT>raise ValidationError(e.__str__())<EOL><DEDENT>except TypeError as e:<EOL><INDENT>raise TypeError(e.__str__())<EOL><DEDENT>except Exception as e:<EOL><INDENT>raise Exception(e.__str__())<EOL><DEDENT>
Function used to get a object
:param app_label: A valid Django Model or a string with format: <app_label>.<model_name>
:param model_name: Key into kwargs that contains de data: new_person
:param object_id:
:return: instance