<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_readonly_fields(self, request, obj=None):
 """ Makes `created_by`, `create_date` & `update_date` readonly when editing. Author: Himanshu Shankar (https://himanshus.com) """


        # Get read only fields from super
        fields = list(super(CreateUpdateAdmin, self).get_readonly_fields(
            request=request, obj=obj))

        # Loop over ownership info field
        for k, v in self.ownership_info['fields'].items():

            # Check if model has k attribute
            # and field k is readonly
            # and k is not already in fields
            # and k is not in excluded field
            # (if not checked, form.Meta.exclude has same field twice)
            if (hasattr(self.model, k)
                    and ('readonly' in v and v['readonly'])
                    and k not in fields
                    and (not self.exclude
                         or (self.exclude and k not in self.exclude))):
                fields.append(k)
        return tuple(fields)