<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def push(self, source_file, device_filename, timeout_ms=None):
 """Push source_file to file on device. Arguments: source_file: Either a filename or file-like object to push to the device. If a filename, will set the remote mtime to match the local mtime, otherwise will use the current time. device_filename: The filename on the device to write to. timeout_ms: Expected timeout for any part of the push. """

    mtime = 0
    if isinstance(source_file, six.string_types):
      mtime = os.path.getmtime(source_file)
      source_file = open(source_file)

    self.filesync_service.send(
        source_file, device_filename, mtime=mtime,
        timeout=timeouts.PolledTimeout.from_millis(timeout_ms))