prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  experiment.get_system_properties() doesn't return "hostname"
  I think there is some regression. For recent experiments `experiment.get_properties()` return either an empty dictionary or `{'key1': 'value1', 'key2': '17', 'key3': 'other-value'}` (whatever that is) in case of the sandbox project.
  
  For older experiments, I still can get the properties. 
  
  This is probably a backend issue but there is no better place to put it.
  
  </issue>
  <code>
  [start of neptune/internal/streams/channel_writer.py]
  1 #
  2 # Copyright (c) 2019, Neptune Labs Sp. z o.o.
  3 #
  4 # Licensed under the Apache License, Version 2.0 (the "License");
  5 # you may not use this file except in compliance with the License.
  6 # You may obtain a copy of the License at
  7 #
  8 #     http://www.apache.org/licenses/LICENSE-2.0
  9 #
  10 # Unless required by applicable law or agreed to in writing, software
  11 # distributed under the License is distributed on an "AS IS" BASIS,
  12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13 # See the License for the specific language governing permissions and
  14 # limitations under the License.
  15 #
  16 
  17 from __future__ import unicode_literals
  18 
  19 import re
  20 import time
  21 
  22 from neptune.internal.channels.channels import ChannelNamespace, ChannelValue, ChannelType
  23 
  24 
  25 class ChannelWriter(object):
  26     __SPLIT_PATTERN = re.compile(r'[\n\r]{1,2}')
  27 
  28     def __init__(self, experiment, channel_name, channel_namespace=ChannelNamespace.USER):
  29         self.time_started_ms = time.time() * 1000
  30         self._experiment = experiment
  31         self._channel_name = channel_name
  32         self._channel_namespace = channel_namespace
  33         self._data = None
  34 
  35     def write(self, data):
  36         if self._data is None:
  37             self._data = data
  38         else:
  39             self._data += data
  40         lines = self.__SPLIT_PATTERN.split(self._data)
  41         for line in lines[:-1]:
  42             value = ChannelValue(
  43                 x=time.time() * 1000 - self.time_started_ms,
  44                 y=dict(text_value=str(line)),
  45                 ts=None
  46             )
  47             # pylint: disable=protected-access
  48             self._experiment._channels_values_sender.send(
  49                 channel_name=self._channel_name,
  50                 channel_type=ChannelType.TEXT.value,
  51                 channel_value=value,
  52                 channel_namespace=self._channel_namespace
  53             )
  54 
  55         self._data = lines[-1]
  56
  [end of neptune/internal/streams/channel_writer.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/neptune/internal/streams/channel_writer.py b/neptune/internal/streams/channel_writer.py
  --- a/neptune/internal/streams/channel_writer.py
  +++ b/neptune/internal/streams/channel_writer.py
  @@ -16,8 +16,8 @@
   
   from __future__ import unicode_literals
   
  +from datetime import datetime
   import re
  -import time
   
   from neptune.internal.channels.channels import ChannelNamespace, ChannelValue, ChannelType
   
  @@ -26,7 +26,7 @@
       __SPLIT_PATTERN = re.compile(r'[\n\r]{1,2}')
   
       def __init__(self, experiment, channel_name, channel_namespace=ChannelNamespace.USER):
  -        self.time_started_ms = time.time() * 1000
  +        self._time_started = experiment.get_system_properties()['created']
           self._experiment = experiment
           self._channel_name = channel_name
           self._channel_namespace = channel_namespace
  @@ -40,7 +40,7 @@
           lines = self.__SPLIT_PATTERN.split(self._data)
           for line in lines[:-1]:
               value = ChannelValue(
  -                x=time.time() * 1000 - self.time_started_ms,
  +                x=(datetime.now(tz=self._time_started.tzinfo) - self._time_started).total_seconds() * 1000,
                   y=dict(text_value=str(line)),
                   ts=None
               )
  
verification_info: {"golden_diff": "diff --git a/neptune/internal/streams/channel_writer.py b/neptune/internal/streams/channel_writer.py\n--- a/neptune/internal/streams/channel_writer.py\n+++ b/neptune/internal/streams/channel_writer.py\n@@ -16,8 +16,8 @@\n \n from __future__ import unicode_literals\n \n+from datetime import datetime\n import re\n-import time\n \n from neptune.internal.channels.channels import ChannelNamespace, ChannelValue, ChannelType\n \n@@ -26,7 +26,7 @@\n     __SPLIT_PATTERN = re.compile(r'[\\n\\r]{1,2}')\n \n     def __init__(self, experiment, channel_name, channel_namespace=ChannelNamespace.USER):\n-        self.time_started_ms = time.time() * 1000\n+        self._time_started = experiment.get_system_properties()['created']\n         self._experiment = experiment\n         self._channel_name = channel_name\n         self._channel_namespace = channel_namespace\n@@ -40,7 +40,7 @@\n         lines = self.__SPLIT_PATTERN.split(self._data)\n         for line in lines[:-1]:\n             value = ChannelValue(\n-                x=time.time() * 1000 - self.time_started_ms,\n+                x=(datetime.now(tz=self._time_started.tzinfo) - self._time_started).total_seconds() * 1000,\n                 y=dict(text_value=str(line)),\n                 ts=None\n             )\n", "issue": "experiment.get_system_properties() doesn't return \"hostname\"\nI think there is some regression. For recent experiments `experiment.get_properties()` return either an empty dictionary or `{'key1': 'value1', 'key2': '17', 'key3': 'other-value'}` (whatever that is) in case of the sandbox project.\r\n\r\nFor older experiments, I still can get the properties. \r\n\r\nThis is probably a backend issue but there is no better place to put it.\n", "before_files": [{"content": "#\n# Copyright (c) 2019, Neptune Labs Sp. z o.o.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\nfrom __future__ import unicode_literals\n\nimport re\nimport time\n\nfrom neptune.internal.channels.channels import ChannelNamespace, ChannelValue, ChannelType\n\n\nclass ChannelWriter(object):\n    __SPLIT_PATTERN = re.compile(r'[\\n\\r]{1,2}')\n\n    def __init__(self, experiment, channel_name, channel_namespace=ChannelNamespace.USER):\n        self.time_started_ms = time.time() * 1000\n        self._experiment = experiment\n        self._channel_name = channel_name\n        self._channel_namespace = channel_namespace\n        self._data = None\n\n    def write(self, data):\n        if self._data is None:\n            self._data = data\n        else:\n            self._data += data\n        lines = self.__SPLIT_PATTERN.split(self._data)\n        for line in lines[:-1]:\n            value = ChannelValue(\n                x=time.time() * 1000 - self.time_started_ms,\n                y=dict(text_value=str(line)),\n                ts=None\n            )\n            # pylint: disable=protected-access\n            self._experiment._channels_values_sender.send(\n                channel_name=self._channel_name,\n                channel_type=ChannelType.TEXT.value,\n                channel_value=value,\n                channel_namespace=self._channel_namespace\n            )\n\n        self._data = lines[-1]\n", "path": "neptune/internal/streams/channel_writer.py"}]}