async def METHOD_NAME(
    self, hash: str, timeout: int = 1, tries: int = 1
) -> Optional[bytes]:
    try_count = 0
    result = None
    while (result is None) and (try_count < tries):
        try_count += 1
        try:
            result = await asyncio.wait_for(
                self.ipfs_client.cat(hash, length=MAX_LEN), timeout=timeout
            )
            if len(result) == MAX_LEN:
                result = None
                break
        except aioipfs.APIError:
            result = None
            await asyncio.sleep(0.5)
            continue
        except (asyncio.TimeoutError):
            result = None
            await asyncio.sleep(0.5)
        except (
            concurrent.futures.CancelledError,
            aiohttp.client_exceptions.ClientConnectorError,
        ):
            try_count -= 1  # do not count as a try.
            await asyncio.sleep(0.1)
    if isinstance(result, str):
        result = result.encode("utf-8")
    return result