code: def bitrate(self):
          
          if hasattr(self.mgfile.info, 'bitrate') and self.mgfile.info.bitrate:
              # Many formats provide it explicitly.
              return self.mgfile.info.bitrate
          else:
              # Otherwise, we calculate bitrate from the file size. (This
              # is the case for all of the lossless formats.)
              if not self.length:
                  # Avoid division by zero if length is not available.
                  return 0
              size = os.path.getsize(self.path)
              return int(size * 8 / self.length)
docs: The number of bits per seconds used in the audio coding (an
          int). If this is provided explicitly by the compressed file
          format, this is a precise reflection of the encoding. Otherwise,
          it is estimated from the on-disk file size. In this case, some
          imprecision is possible because the file header is incorporated
          in the file size.