<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def contains(self, key):
    '''Returns whether the object named by `key` exists.
    Optimized to only check whether the file object exists.

    Args:
      key: Key naming the object to check.

    Returns:
      boalean whether the object exists
    '''
    path = self.object_path(key)
    return os.path.exists(path) and os.path.isfile(path)