code: def create_weight(self, weight, date=None):
          
          url = self._build_url('my', 'body', 'weight')
          data = {'weightInKilograms': weight}
          if date:
              if not date.is_aware():
                  raise ValueError("provided date is not timezone aware")
              data.update(date=date.isoformat())
          headers = {'Content-Type': 'application/json; charset=utf8'}
          r = self.session.post(url, data=json.dumps(data), headers=headers)
          r.raise_for_status()
          return r
docs: Submit a new weight record.
  
          :param weight: The weight, in kilograms.
          :param date: The date the weight was recorded. If not
                       specified, the current date will be used.