Unless you are decoding a data structure that only contains base ASN.1 types (such as INTEGER, SEQUENCE etc.), you need to pass your top-level ASN.1 data structure object to decoder. That way decoder could match custom tags (of TLV tuples in BER/DER/CER serialization) with the same tags present in data structure object. For example:
custom_int_type = Integer().subtype(implicitTag=Tag(tagClassContext, tagFormatSimple, 40))
custom_int_instance = custom_int_type.clone(12345)
serialization = encode(custom_int_instance)
# this will fail on unknown custom ASN.1 type tag
custom_int_instance, rest_of_serialization = decode(serialization)
# this will succeed as custom ASN.1 type (containing tag) is provided
custom_int_instance, rest_of_serialization = decode(serialization, asn1Spec=custom_int_type)
Here is a link to pyasn1 documentation on decoders.
To pass ASN.1 grammar to pyasn1 decoder you have to first turn your grammar into pyasn1/Python tree of objects. That is a one-time operation that sometimes can be automated with the asn1late tool.
My other concern is that you are possibly reading a fraction of your serialized data (5 octets). That could be a valid operation if your data was serialized using "indefinite length encoding mode", otherwise decoder may fail on insufficient input.