docstr: Return a new type with the width rounded to the next factor of 8 up to p's width
  Args:
      p : IntegerPrecisionType or FixedPrecisionType
  Returns:
      An IntegerPrecisionType or FixedPrecisionType with the width rounder up to the next factor of 8
      of p's width. Other parameters (fractional bits, extra modes) stay the same.
docstr_tok: ["Return","a","new","type","with","the","width","rounded","to","the","next","factor","of","8","up","to","p","'s","width","Args",":","p",":","IntegerPrecisionType","or","FixedPrecisionType","Returns",":","An","IntegerPrecisionType","or","FixedPrecisionType","with","the","width","rounder","up","to","the","next","factor","of","8","of","p","'s","width",".","Other","parameters","(","fractional","bits",",","extra","modes",")","stay","the","same","."]
code: def _next_factor8_type(self, p):
      """Return a new type with the width rounded to the next factor of 8 up to p's width
      Args:
          p : IntegerPrecisionType or FixedPrecisionType
      Returns:
          An IntegerPrecisionType or FixedPrecisionType with the width rounder up to the next factor of 8
          of p's width. Other parameters (fractional bits, extra modes) stay the same.
      """
      W = p.width
      newW = int(np.ceil(W / 8) * 8)
      if isinstance(p, FixedPrecisionType):
          return FixedPrecisionType(
              newW,
              p.integer,
              p.signed,
              p.rounding_mode,
              p.saturation_mode,
              p.saturation_bits,
          )
      elif isinstance(p, IntegerPrecisionType):
          return IntegerPrecisionType(newW, p.signed)
  
imports: import json
  import os
  import numpy
  from hls4ml.model.layers import FixedPrecisionType, IntegerPrecisionType
label_desc: Use image node_id 2 for calling the VivadoAcceleratorConfig obj's underlying member method code with example usage: obj._next_factor8_type(p) and returns: FixedPrecisionType, IntegerPrecisionType