<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def append_tz_time_only(self, tag, timestamp=None, precision=3, header=False):
 """Append a field with a TZTimeOnly value. :param tag: Integer or string FIX tag number. :param timestamp: Time value, see below. :param precision: Number of decimal places: 0, 3 (ms) or 6 (us). :param header: Append to FIX header if True; default to body. The `timestamp` value should be a local datetime, such as created by datetime.datetime.now(); a float, being the number of seconds since midnight 1 Jan 1970 UTC, such as returned by time.time(); or, None, in which case datetime.datetime.now() is used to get the current UTC time. Precision values other than None (minutes), zero (seconds), 3 (milliseconds), or 6 (microseconds) will raise an exception. Note that prior to FIX 5.0, only values of 0 or 3 comply with the standard."""


        if timestamp is None:
            t = datetime.datetime.now()
        elif type(timestamp) is float:
            t = datetime.datetime.fromtimestamp(timestamp)
        else:
            t = timestamp

        now = time.mktime(t.timetuple()) + (t.microsecond * 1e-6)
        utc = datetime.datetime.utcfromtimestamp(now)
        td = t - utc
        offset = int(((td.days * 86400) + td.seconds) / 60)

        s = t.strftime("%H:%M")
        if precision == 0:
            s += t.strftime(":%S")
        elif precision == 3:
            s += t.strftime(":%S")
            s += ".%03u" % (t.microsecond / 1000)
        elif precision == 6:
            s += t.strftime(":%S")
            s += ".%06u" % t.microsecond
        elif precision is not None:
            raise ValueError("Precision should be one of "
                             "None, 0, 3 or 6 digits")

        s += self._tz_offset_string(offset)
        return self.append_pair(tag, s, header=header)