Telegraf starlark issues - SNMP OID value conversion Bytes to bits

I was looking for some help to convert the OID value from Bytes to bits using Starlark.
[[inputs.snmp.table.field]]
name = “ifOutMulticastPkts”
oid = “.1.3.6.1.2.1.31.1.1.1.4”
[[inputs.snmp.table.field]]
name = “ifOutBroadcastPkts”
oid = “.1.3.6.1.2.1.31.1.1.1.5”
[[inputs.snmp.table.field]]
name = “ifHCInOctets”
oid = “.1.3.6.1.2.1.31.1.1.1.6”

[[processors.starlark]]
namepass = [“interfacestats*”]
source = ‘’’
def apply(metric):
for k, v in metric.fields.get(“"ifHCInOctets"”):
if v == None:
return metric
if type(v) == “int”:
metric.fields[k] = v * 8
return metric
‘’’

Hello @akamal1981,
Have you seen these blog posts I find them useful

and this?

They could be useful