def METHOD_NAME(self):
    """
    Class: `IMDB`\n
    Retrieves the top-rated movies listed on IMDB.
    Example:
    ```python
    top_movies = IMDB()
    result = top_movies.top_rated()
    ```
    Returns:
    ```js
    [
        {
            "title":"1. The Shawshank Redemption",
            "year":"1994",
            "duration":"2h 22m",
            "rating":"9.3"
        }
        ...
    ]
    ```
    """
    try:
        url = "https://www.imdb.com/chart/top/?ref_=nv_mv_250"
        html_text = requests.get(url, headers=self.headers).text
        soup = BeautifulSoup(html_text, "lxml")
        movies_container = soup.find(
            "ul",
            {
                "class": "ipc-metadata-list ipc-metadata-list--dividers-between sc-3a353071-0 wTPeg compact-list-view ipc-metadata-list--base"
            },
        )
        movies = []
        for items in movies_container.find_all("li"):
            title = items.find("h3").text
            years = items.find(
                "span", {"class": "sc-14dd939d-6 kHVqMR cli-title-metadata-item"}
            )
            duration = years.next_sibling.text
            rating = items.find(
                "span",
                {
                    "class": "ipc-rating-star ipc-rating-star--base ipc-rating-star--imdb ratingGroup--imdb-rating"
                },
            ).text
            data = {
                "title": title,
                "year": years.text,
                "duration": duration,
                "rating": rating,
            }
            movies.append(data)
        return movies
    except requests.exceptions.RequestException as e:
        return None