homogeneous Period targets bug fix
- [ ] closes #xxxx (Replace xxxx with the Github issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Hello @monishkumar9677! Thanks for opening this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:

* In the file [`sample.py`](https://github.com/pandas-dev/pandas/blob/0e7692a7f73194a00a0475ecd58ad04bf44aeaae/sample.py):

> [Line 1:20](https://github.com/pandas-dev/pandas/blob/0e7692a7f73194a00a0475ecd58ad04bf44aeaae/sample.py#L1): [E703](https://duckduckgo.com/?q=pep8%20E703) statement ends with a semicolon
> [Line 2:16](https://github.com/pandas-dev/pandas/blob/0e7692a7f73194a00a0475ecd58ad04bf44aeaae/sample.py#L2): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 23:24](https://github.com/pandas-dev/pandas/blob/0e7692a7f73194a00a0475ecd58ad04bf44aeaae/sample.py#L23): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 25:23](https://github.com/pandas-dev/pandas/blob/0e7692a7f73194a00a0475ecd58ad04bf44aeaae/sample.py#L25): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 27:22](https://github.com/pandas-dev/pandas/blob/0e7692a7f73194a00a0475ecd58ad04bf44aeaae/sample.py#L27): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 31:23](https://github.com/pandas-dev/pandas/blob/0e7692a7f73194a00a0475ecd58ad04bf44aeaae/sample.py#L31): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 37:1](https://github.com/pandas-dev/pandas/blob/0e7692a7f73194a00a0475ecd58ad04bf44aeaae/sample.py#L37): [W391](https://duckduckgo.com/?q=pep8%20W391) blank line at end of file

 Thanks for the pull request but appears this is already being addressed in https://github.com/pandas-dev/pandas/pull/46668 so closing in favor of that issue.


As mentioned, please read pandas guide on writing a unit test. https://pandas.pydata.org/docs/development/contributing_codebase.html#test-driven-development-code-writing
