<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def owned_by(self, owner, also_check_group=False):
 """ Checks if the specified user or user and group own the file. Args: owner (str):
 the user (or group) name for which we ask about ownership also_check_group (bool):
 if set to True, both user owner and group owner checked if set to False, only user owner checked Returns: bool: True if owner of the file is the specified owner """

        if also_check_group:
            return self.owner == owner and self.group == owner
        else:
            return self.owner == owner